[cdi-dev] [JBoss JIRA] (CDI-433) AdminEvent example has redundant qualifiers.

John Ament (JIRA) issues at jboss.org
Thu Apr 17 19:42:33 EDT 2014


John Ament created CDI-433:
------------------------------

             Summary: AdminEvent example has redundant qualifiers.
                 Key: CDI-433
                 URL: https://issues.jboss.org/browse/CDI-433
             Project: CDI Specification Issues
          Issue Type: Clarification
            Reporter: John Ament
            Priority: Minor


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;}}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the cdi-dev mailing list