Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:polemico: Simplifying Events #436

Merged
merged 3 commits into from
Mar 19, 2014
Merged

:polemico: Simplifying Events #436

merged 3 commits into from
Mar 19, 2014

Conversation

lucascs
Copy link
Member

@lucascs lucascs commented Mar 18, 2014

  • NewRequest now holds the corresponding RequestInfo
  • ControllerMethod turned into an event, so we can remove ControllerMethodDiscovered. @Observes ControllerMethod reads just fine, IMHO.
  • MethodInfo now observes changes in ControllerMethod and @Produces it, so we can remove ControllerMethodFactory.

I tried to remove NewRequest also, but there is some weird dependency.
WANT: remove CDIProvider.

What do you think?

@@ -10,4 +11,14 @@
*/
public class NewRequest {

private final RequestInfo request;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would change the field to requestInfo (and getRequestInfo, sure =)
Just to be clear that its not the real request. What do you think?

@Turini
Copy link
Member

Turini commented Mar 18, 2014

besides the minor on field name, everthink seems fair enough to me. 👍

@Turini
Copy link
Member

Turini commented Mar 18, 2014

I tried to remove NewRequest also, but there is some weird dependency.

which dependency?

@garcia-jj
Copy link
Member

:thanks_god: I love it

@lucascs
Copy link
Member Author

lucascs commented Mar 18, 2014

@Turini I don't know which dependency, I get a StackOverflow if RequestObserverHandler receives a @Observes RequestInfo

@Turini
Copy link
Member

Turini commented Mar 18, 2014

Turini I don't know which dependency, I get a StackOverflow if RequestObserverHandler
receives a @observes RequestInfo

I'm having a different problem changing it, because CDIRequestInfoFactory observes
RequestInfo too, so the execution order breaks the code. Did you face this problem?

@lucascs
Copy link
Member Author

lucascs commented Mar 18, 2014

I'll try again tonight and see if I come up with some good solution.

lucascs added a commit that referenced this pull request Mar 19, 2014
@lucascs lucascs merged commit 451b2f5 into master Mar 19, 2014
@lucascs lucascs deleted the lc-refactoring-events branch March 19, 2014 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants