Details
-
Type:
Feature Request
-
Status: Resolved (View Workflow)
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: 1.0
-
Fix Version/s: 1.1.PFD
-
Component/s: None
-
Labels:None
Description
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.
Gliffy Diagrams
Issue Links
- is related to
-
CDI-493
Allow firing of parameterized event types from BeanManager
-
- Open
-
-
CDI-256
CDI spec is not consistent in treating types selected by Event
-
- Resolved
-
-
CDITCK-232
Fix org.jboss.jsr299.tck.tests.event.fires.FireEventTest.testTypeVariableEventTypeFails() to align with spec
-
- Resolved
-
-
WELD-978
Cannot fire event with parameterized type as a payload
-
- Resolved
-
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.