Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-16499

@Provider annotation doesn't work with ClientRequestFilter

XMLWordPrintable

      @Provider annotation doesn't work with ClientRequestFilter

      Steps to reproduce:

      1. https://github.com/xstefank/reproducers/tree/master/jaxrs-filters
      2. deploy the app
      3. curl localhost:8080/jaxrs-filters/ping
      4. remove javax.ws.rs.ext.Providers
      5. curl localhost:8080/jaxrs-filters/ping
      6. custom ClientRequestFilter is not invoked

      This is violation of chapter 6.1 of jax-rs spec:

      A client filter is a class that implements ClientRequestFilter or ClientResponseFilter or both. A container filter is a class that implements ContainerRequestFilter or ContainerResponseFilter, or both. An entity interceptor is a class that implements ReaderInterceptor or WriterInterceptor, or both. Filters and entity interceptors are providers and, as such, may be annotated with @Provider for automatic discovery.

      Documentation - The fix will be adding new system property "resteasy.client.providers.annotations.disabled" which will allow previous behavior – to disable scanning of client providers by @Provider annotation.

              sybrown Symone Simpkins
              mstefank Martin Stefanko
              Marek Kopecky Marek Kopecky
              Marek Kopecky Marek Kopecky
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: