Uploaded image for project: 'Quarkus'
  1. Quarkus
  2. QUARKUS-3954

Reactive REST Client: check for ClientRequestFilter when skipping @Provider auto-discovery

XMLWordPrintable

      From release 3.5.2, auto-discovery was skipped for @Provider classes that implements server-specific filters. Unfortunately this means that filters implementing all three interfaces in one class are also skipped. In this case the result is that client request filter is never invoked:

      ```java
      @Provider
      public class MyFilter implements ContainerRequestFilter, ContainerResponseFilter, ClientRequestFilter {

      @Override
      public void filter(ContainerRequestContext requestContext) throws IOException

      { // server request filter }

      @Override
      public void filter(ContainerRequestContext requestContext, ContainerResponseContext responseContext)

      { // server response filter }

      @Override
      public void filter(ClientRequestContext requestContext)

      { // client request filter - NOT working for Quarkus >= 3.5.2 }


      }
      ```

      This PR fixes that regression and aims to enhance readability.

      Unfortunately `ResteasyReactiveDotNames` does not have a constant defined for `ClientRequestContext`, so a `.class.getName()` was necessary.

              Unassigned Unassigned
              olubyans@redhat.com Alexey Loubyansky
              Martin Ocenas Martin Ocenas
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: