Skip to content

Commit

Permalink
Merge pull request #37006 from famod/fix-rr-client-server-filter
Browse files Browse the repository at this point in the history
Never register server specific providers in REST Client (fixed)
  • Loading branch information
famod authored Nov 12, 2023
2 parents 15c8ba8 + 569ea37 commit 325746a
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -310,18 +310,20 @@ void registerProvidersFromAnnotations(CombinedIndexBuildItem indexBuildItem,
continue;
}
}
DotName providerDotName = providerClass.name();

List<DotName> providerInterfaceNames = providerClass.interfaceNames();
// don't register server specific types
if (providerDotName.equals(ResteasyReactiveDotNames.CONTAINER_REQUEST_FILTER)
|| providerDotName.equals(ResteasyReactiveDotNames.CONTAINER_RESPONSE_FILTER)
|| providerDotName.equals(ResteasyReactiveDotNames.EXCEPTION_MAPPER)) {
if (providerInterfaceNames.contains(ResteasyReactiveDotNames.CONTAINER_REQUEST_FILTER)
|| providerInterfaceNames.contains(ResteasyReactiveDotNames.CONTAINER_RESPONSE_FILTER)
|| providerInterfaceNames.contains(ResteasyReactiveDotNames.EXCEPTION_MAPPER)) {
continue;
}

if (providerClass.interfaceNames().contains(ResteasyReactiveDotNames.FEATURE)) {
if (providerInterfaceNames.contains(ResteasyReactiveDotNames.FEATURE)) {
continue; // features should not be automatically registered for the client, see javadoc for Feature
}

DotName providerDotName = providerClass.name();
int priority = getAnnotatedPriority(index, providerDotName.toString(), Priorities.USER);

constructor.invokeVirtualMethod(
Expand Down

0 comments on commit 325746a

Please sign in to comment.