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

Wrong @NameBinding quick fix for a @Target annotation

    XMLWordPrintable

    Details

    • Steps to Reproduce:
      Hide

      STEP: Create annotation annotated with @NameBinding and @Retention(RetentionPolicy.RUNTIME) in Dynamic Web Project with JAX-RS Support

      @Retention(RetentionPolicy.RUNTIME)
      @NameBinding
      public @interface Authorized {
      }
      

      ASSERT: There is an error complaining about missing @Target annotation

      STEP: Use quick fix "Add @Target annotation ..."
      ASSERT: There is no error
      FAIL: There is error:

      The @Target annotation value is not correct. It should be {ElementType.TYPE, ElementType.METHOD}
      

      STEP: Use quick fix
      FAIL: There is still an error

      Show
      STEP: Create annotation annotated with @NameBinding and @Retention(RetentionPolicy.RUNTIME) in Dynamic Web Project with JAX-RS Support @Retention(RetentionPolicy.RUNTIME) @NameBinding public @ interface Authorized { } ASSERT: There is an error complaining about missing @Target annotation STEP: Use quick fix "Add @Target annotation ..." ASSERT: There is no error FAIL: There is error: The @Target annotation value is not correct. It should be {ElementType.TYPE, ElementType.METHOD} STEP: Use quick fix FAIL: There is still an error
    • Release Notes Text:
      New Java proposals when annotation values are missing

      Description

      There is broken quick fix for a missing @Target on annotation, which is annotated with @NameBinding.
      It will add "@Target(ElementType.METHOD)" which causes error because "@Target({ElementyType.TYPE, ElementType.METHOD})" is required.
      This error also have a quick fix but it doesn't solve a problem.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  xcoulon Xavier Coulon
                  Reporter:
                  rrabara Radoslav RĂ¡bara
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: