[weld-issues] [JBoss JIRA] Closed: (WELD-454) Observer resolution (event qualifier handling) not in-line with spec

Pete Muir (JIRA) jira-events at lists.jboss.org
Mon Mar 1 07:32:10 EST 2010


     [ https://jira.jboss.org/jira/browse/WELD-454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pete Muir closed WELD-454.
--------------------------

    Resolution: Rejected


Right, Weld is behaving as the spec intends. Send an email to jsr-299-comments at jcp.org to request spec clarification if you feel it is needed :-)

> Observer resolution (event qualifier handling) not in-line with spec
> --------------------------------------------------------------------
>
>                 Key: WELD-454
>                 URL: https://jira.jboss.org/jira/browse/WELD-454
>             Project: Weld
>          Issue Type: Bug
>          Components: Documentation, Events
>    Affects Versions: 1.0.0.GA, 1.0.1.Final
>         Environment: Windows XP SP3, JDK 1.6 u17, GlassFish v3
>            Reporter: Matthieu Chase Heimer
>
> Page 71 of the spec states: An event is delivered to an observer method if the observer method has *ALL* the event qualifiers. (emphasis mine). The behavior of Weld is if all method qualifiers are present on the event then the method will receive the event. 
> //event injection point
> @Inject @Q1 @Q2 Event<Color> colorEvent;
> //fire event 
> colorEvent.fire(Color.BLUE);
> //All events have both a Q1 and Q2 qualifier
> //only the last method should be called but all four methods are called
> public class ColorChangeConsumer {
>     public void onAnyColorChange(@Observes Color color) {}
>     public void onQ1ColorChange(@Observes @Q1 Color color) {}
>     public void onQ2ColorChange(@Observes @Q2 Color color) {}
>     public void onQ1QQ2ColorChange(@Observes @Q1 @Q2 Color color) {}
> }
> This behavior is also seen when using Event.select as seen in the docs: http://docs.jboss.org/weld/reference/1.0.1-Final/en-US/html_single/#d0e4194

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list