]
Antoine Sabot-Durand updated CDI-433:
-------------------------------------
Fix Version/s: 2.0-EDR2
AdminEvent example has redundant qualifiers.
--------------------------------------------
Key: CDI-433
URL:
https://issues.jboss.org/browse/CDI-433
Project: CDI Specification Issues
Issue Type: Clarification
Affects Versions: 1.2.Final
Reporter: John Ament
Priority: Minor
Fix For: 2.0-EDR2
In the CDI 1.2 spec, the following text appears:
For example, this injected Event has specified type LoggedInEvent and specified qualifier
@Admin:
{{@Inject @Admin Event<LoggedInEvent> any;}}
The select() method returns a child Event for a given specified type and additional
specified qualifiers. If no specified type is given, the specified type is the same as the
parent.
For example, this child Event has required type AdminLoggedInEvent and additional
specified qualifier {{@Admin}}:
{noformat}
Event<AdminLoggedInEvent> admin = any.select(
AdminLoggedInEvent.class,
new AdminQualifier() );
{noformat}
The problem is that the injection point any already is qualified @Admin, so the use is
duplicate here. I believe the intention was that the injection point would read
{{@Inject Event<LoggedInEvent> any;}}