diff --git a/extensions/resteasy-reactive/rest-client-reactive/deployment/src/main/java/io/quarkus/rest/client/reactive/deployment/RestClientReactiveProcessor.java b/extensions/resteasy-reactive/rest-client-reactive/deployment/src/main/java/io/quarkus/rest/client/reactive/deployment/RestClientReactiveProcessor.java index 1b3cf9c7b37052..b93c71ca0af25b 100644 --- a/extensions/resteasy-reactive/rest-client-reactive/deployment/src/main/java/io/quarkus/rest/client/reactive/deployment/RestClientReactiveProcessor.java +++ b/extensions/resteasy-reactive/rest-client-reactive/deployment/src/main/java/io/quarkus/rest/client/reactive/deployment/RestClientReactiveProcessor.java @@ -9,6 +9,8 @@ import static io.quarkus.rest.client.reactive.deployment.DotNames.CLIENT_QUERY_PARAM; import static io.quarkus.rest.client.reactive.deployment.DotNames.CLIENT_QUERY_PARAMS; import static io.quarkus.rest.client.reactive.deployment.DotNames.CLIENT_REDIRECT_HANDLER; +import static io.quarkus.rest.client.reactive.deployment.DotNames.CLIENT_REQUEST_FILTER; +import static io.quarkus.rest.client.reactive.deployment.DotNames.CLIENT_RESPONSE_FILTER; import static io.quarkus.rest.client.reactive.deployment.DotNames.REGISTER_CLIENT_HEADERS; import static io.quarkus.rest.client.reactive.deployment.DotNames.REGISTER_PROVIDER; import static io.quarkus.rest.client.reactive.deployment.DotNames.REGISTER_PROVIDERS; @@ -38,7 +40,6 @@ import jakarta.inject.Singleton; import jakarta.ws.rs.Priorities; import jakarta.ws.rs.RuntimeType; -import jakarta.ws.rs.client.ClientRequestFilter; import jakarta.ws.rs.core.MediaType; import jakarta.ws.rs.core.MultivaluedMap; @@ -119,6 +120,7 @@ class RestClientReactiveProcessor { private static final String ENABLE_COMPRESSION = "quarkus.http.enable-compression"; private static final String KOTLIN_INTERFACE_DEFAULT_IMPL_SUFFIX = "$DefaultImpls"; + private static final Set SKIP_COPYING_ANNOTATIONS_TO_GENERATED_CLASS = Set.of( REGISTER_REST_CLIENT, REGISTER_PROVIDER, @@ -298,7 +300,7 @@ void registerProvidersFromAnnotations(CombinedIndexBuildItem indexBuildItem, } } - if (skipAutoDiscovery(providerClass.interfaceNames())) { + if (skipAutoDiscoveredProvider(providerClass.interfaceNames())) { continue; } @@ -579,14 +581,15 @@ && isImplementorOf(index, target.asClass(), RESPONSE_EXCEPTION_MAPPER, Set.of(AP * of a ClientRequestFilter exists on the same class explicitly. * Features should always be omitted. */ - private boolean skipAutoDiscovery(List providerInterfaceNames) { + private boolean skipAutoDiscoveredProvider(List providerInterfaceNames) { if (providerInterfaceNames.contains(ResteasyReactiveDotNames.FEATURE)) { return true; } if (providerInterfaceNames.contains(ResteasyReactiveDotNames.CONTAINER_REQUEST_FILTER) || providerInterfaceNames.contains(ResteasyReactiveDotNames.CONTAINER_RESPONSE_FILTER) || providerInterfaceNames.contains(ResteasyReactiveDotNames.EXCEPTION_MAPPER)) { - if (providerInterfaceNames.contains(DotName.createSimple(ClientRequestFilter.class.getName()))) { + if (providerInterfaceNames.contains(CLIENT_REQUEST_FILTER) + || providerInterfaceNames.contains(CLIENT_RESPONSE_FILTER)) { return false; } else { return true;