Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-18492

Incorrect Qualifier Target validation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.3.0.Alpha1
    • 4.1.2.Final
    • cdi
    • None
    • Hide

      Create the following qualifier.

      @Qualifier
      @Target({ TYPE, METHOD })
      @Retention(RUNTIME)
      @Documented
      public @interface CantInjectMeImTheGingerbreadQualifier {
      
      }
      
      Show
      Create the following qualifier. @Qualifier @Target({ TYPE, METHOD }) @Retention(RUNTIME) @Documented public @ interface CantInjectMeImTheGingerbreadQualifier { }

      The warning states:

      Qualifier annotation type must be annotated with @Target({TYPE, METHOD, FIELD, PARAMETER}) or @Target({FIELD, PARAMETER}) [JSR-299 §2.3.2, §10.1]
      

      Both referenced specification articles say "typically defined as", not "must be one of". Weld 2.2.5.Final doesn't have any issues with the Targets, that are deemed incorrect by CDI Tools.
      It's invalid to put any restriction on a Target at all.

            scabanovich Viacheslav Kabanovich (Inactive)
            vsevolodgol Vsevolod Golovanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: