[cdi-dev] Tests on observer resolution

Pete Muir pmuir at redhat.com
Sun Mar 16 13:51:15 EDT 2014


Yeah, agreed, this is something I’ve puzzled over before.

On 6 Mar 2014, at 11:51, Antoine Sabot-Durand <antoine at sabot-durand.net> wrote:

> Hi all
> 
> 
> Yesterday when reviewing Martin Pull Request [1] regarding CDI 422 [2], we started a discussion about Observer Resolution about a possible issue in the spec. I will not repeat what was said on the IRC, if you’re interested you can check the transcript [3] from 09:43.
> 
> To check if this was an issue or not I did some test this morning with different implementations. You can grab the tests on Github [4]
> 
> Good news : OWB and Weld (1.x and 2.x) have the same behavior : the one describe in the current spec, so there are no issue on this point.
> The only strange thing for me is that @Any seems totally useless regarding events firing
> 
> If you write : 
> @Inject Event<Payload> payLoadEvent;
> or
> @Inject @Any Event<Payload> payLoadEvent;
> 
> You’ll always be allowed call payLoadEvent.select(new QualifierLiteral()) in both case...
> 
> Perhaps this point can be discussed to see if we remove @Any from the examples in the spec or if we enforce its usage in the specification…
> 
> Antoine
> 
> [1] https://github.com/cdi-spec/cdi/pull/207
> [2] https://issues.jboss.org/browse/CDI-422
> [3] http://transcripts.jboss.org/channel/irc.freenode.org/%23jsr346/2014/%23jsr346.2014-03-05.log.html
> [4] https://github.com/antoinesd/EventsTest
> _______________________________________________
> cdi-dev mailing list
> cdi-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/cdi-dev




More information about the cdi-dev mailing list