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

No JAX-RS problems when importing a project that contains HTTPMethod annotation without @Target and @Retention

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 4.2.0.Alpha1
    • 4.1.0.Final
    • webservices
    • None
    • Hide

      STEP: Create Dynamic Web Project with JAX-RS support.
      STEP: Create annotation annotated with the @HttpMethod annotation without @Target and @Retention annotation.

      import javax.ws.rs.HttpMethod;
      
      @HttpMethod(value="GET")
      public @interface MyAnnotation {
       
      }
      

      ASSERT: There are 2 errors:
      (JAX-RS Problem) The HTTP Method should have a @Retention(RetentionPolicy.RUNTIME) annotation on its type.
      (JAX-RS Problem) The HTTP Method should have a @Target(ElementType.METHOD) annotation on its type.
      STEP: Open a fresh workspace and import the project.
      ASSERT: There are still 2 errors.
      FAIL: There is no error.

      Show
      STEP: Create Dynamic Web Project with JAX-RS support. STEP: Create annotation annotated with the @HttpMethod annotation without @Target and @Retention annotation. import javax.ws.rs.HttpMethod; @HttpMethod(value= "GET" ) public @ interface MyAnnotation { } ASSERT: There are 2 errors: (JAX-RS Problem) The HTTP Method should have a @Retention(RetentionPolicy.RUNTIME) annotation on its type. (JAX-RS Problem) The HTTP Method should have a @Target(ElementType.METHOD) annotation on its type. STEP: Open a fresh workspace and import the project. ASSERT: There are still 2 errors. FAIL: There is no error.
    • Workaround Exists
    • Hide

      After importing the project, change the file that contains HTTPMethod annotation (e.g. add white-space and save the file).

      Show
      After importing the project, change the file that contains HTTPMethod annotation (e.g. add white-space and save the file).

    Description

      After importing Dynamic Web Project with JAX-RS support with HTTPMethod annotation without @Target and @Retention annotations, there is no error.
      This looks like a regression of JBIDE-12690.

      Attachments

        Issue Links

          Activity

            People

              xcoulon@redhat.com Xavier Coulon
              rrabara Radoslav RĂ¡bara (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: