Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Never register server specific providers in REST Client (fixed) #37006

Merged
merged 1 commit into from
Nov 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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