Uploaded image for project: 'CDI Specification Issues'
  1. CDI Specification Issues
  2. CDI-433

AdminEvent example has redundant qualifiers.

    XMLWordPrintable

Details

    • Clarification
    • Resolution: Done
    • Minor
    • 2.0 .Final
    • 1.2.Final
    • None
    • None

    Description

      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:

      Event<AdminLoggedInEvent> admin = any.select(
                  AdminLoggedInEvent.class,
                  new AdminQualifier() );
      

      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;

      Attachments

        Activity

          People

            Unassigned Unassigned
            meetoblivion_jira John Ament (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: