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

Invalid error message when @Target is missing on a custom Name Binding annotation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.1.CR1
    • 4.2.0.Final
    • webservices
    • None

      With the following code:

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

      The error message is

      The Name Binding should have a @Target(ElementType.METHOD) annotation on its type.

      but it should be

      The Name Binding should have a @Target({ElementType.TYPE, ElementType.METHOD}) annotation on its type.

      Note that the QuickFix adds the correct @Target({ElementType.TYPE, ElementType.METHOD}), it's just that the initial error message was misleading

            xcoulon@redhat.com Xavier Coulon
            xcoulon@redhat.com Xavier Coulon
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: