Skip to content

Commit

Permalink
Never register server specific providers in REST Client (fixed)
Browse files Browse the repository at this point in the history
  • Loading branch information
famod committed Nov 10, 2023
1 parent 183a165 commit 569ea37
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 569ea37

Please sign in to comment.