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

Tomas Remes (JIRA) issues at jboss.org
Fri Oct 9 04:38:00 EDT 2015

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

Tomas Remes commented on CDI-433:


> 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
> 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 was sent by Atlassian JIRA

More information about the cdi-dev mailing list