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

Problem with filters and interceptors defined as inner classes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.2.0.CR1
    • 4.2.0.Beta1
    • webservices
    • None
    • Sprint to Beta3 Release
    • Hide

      STEP: Create filter as inner class

      public class RestService {
          public static class AuthorizedResponseFilter implements ContainerResponseFilter {
      		@Override
      		public void filter(ContainerRequestContext arg0,
      				ContainerResponseContext arg1) throws IOException {
      		}
          }
      }
      

      ASSERT: There is warning

      The @Provider annotation is missing on this java type. Make sure this JAX-RS Provider is declared in the JAX-RS Application subclass if you dont want to rely on automatic discovery.
      

      FAIL: The warning is missing

      Show
      STEP: Create filter as inner class public class RestService { public static class AuthorizedResponseFilter implements ContainerResponseFilter { @Override public void filter(ContainerRequestContext arg0, ContainerResponseContext arg1) throws IOException { } } } ASSERT: There is warning The @Provider annotation is missing on this java type. Make sure this JAX-RS Provider is declared in the JAX-RS Application subclass if you dont want to rely on automatic discovery. FAIL: The warning is missing

      It seems that filter and interceptors are not recognized if they are defined as inner classes.
      e.g. there is no warning "The @Provider annotation is missing ...".

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

              Created:
              Updated:
              Resolved: