[cdi-dev] [JBoss JIRA] Commented: (CDI-169) Remove the 'No type variable in event objects' restriction

Martin Kouba (JIRA) jira-events at lists.jboss.org
Tue Sep 27 05:23:26 EDT 2011

    [ https://issues.jboss.org/browse/CDI-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12630650#comment-12630650 ] 

Martin Kouba commented on CDI-169:

I don't think so. A type variable is an unqualified identifier (e.g. X in ProcessBean<X>; see http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.4) and is not the same as parameterized type with actual type arguments (e.g. ProcessBean<Foo> event; see http://java.sun.com/docs/books/jls/third_edition/html/typesValues.html#4.5). Some of container lifecycle events are generic types with type variables but the concrete event object fired/observed is parameterized type with actual type arguments.

> 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