[cdi-dev] [JBoss JIRA] Commented: (CDI-169) Remove the 'No type variable in event objects' restriction
Stuart Douglas (JIRA)
jira-events at lists.jboss.org
Tue Sep 27 05:48:26 EDT 2011
[ https://issues.jboss.org/browse/CDI-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630655#comment-12630655 ]
Stuart Douglas commented on CDI-169:
------------------------------------
The way the spec is worded I don't really know if this is the case. At runtime due to type erasure there is not really such a thing as SomeObject<Concrete>, there is only SomeObject, so the actual event object that is fired has a type parameter (and in fact Weld checks this when injecting Event objects and will not allow you to inject Event<SomeType<ConcreteType>>, so it appears I am not the only one that has read it this way).
At the very least this language should be clarified.
> Remove the 'No type variable in event objects' restriction
> ----------------------------------------------------------
>
> Key: CDI-169
> URL: https://issues.jboss.org/browse/CDI-169
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Affects Versions: 1.0
> Reporter: Stuart Douglas
>
> CDI 10.1 states:
> An event object is an instance of a concrete Java class with no type variables. ... An event type may not contain a type variable.
> Which seems silly considering the container fires events with a type variable at startup. I can't think of any reason why this should be prohibited.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the cdi-dev
mailing list