Skip to content

Commit

Permalink
Fix Keycloak Admin Client Reactive Jackson reader provider priority
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvavrik committed Feb 18, 2024
1 parent 427e73f commit 8c0c413
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
public class ResteasyReactiveClientProvider implements ResteasyClientProvider {

private static final List<String> HANDLED_MEDIA_TYPES = List.of(MediaType.APPLICATION_JSON);
private static final int PROVIDER_PRIORITY = Priorities.USER + 100; // ensures that it will be used first
private static final int WRITER_PROVIDER_PRIORITY = Priorities.USER + 100; // ensures that it will be used first
private static final int READER_PROVIDER_PRIORITY = Priorities.USER - 100; // ensures that it will be used first

private final boolean tlsTrustAll;

Expand Down Expand Up @@ -77,9 +78,9 @@ private ClientBuilderImpl registerJacksonProviders(ClientBuilderImpl clientBuild
clientBuilder = clientBuilder
.registerMessageBodyReader(new JacksonBasicMessageBodyReader(newObjectMapper), Object.class,
HANDLED_MEDIA_TYPES, true,
PROVIDER_PRIORITY)
READER_PROVIDER_PRIORITY)
.registerMessageBodyWriter(new ClientJacksonMessageBodyWriter(newObjectMapper), Object.class,
HANDLED_MEDIA_TYPES, true, PROVIDER_PRIORITY);
HANDLED_MEDIA_TYPES, true, WRITER_PROVIDER_PRIORITY);
}
InstanceHandle<ClientLogger> clientLogger = arcContainer.instance(ClientLogger.class);
if (clientLogger.isAvailable()) {
Expand Down

0 comments on commit 8c0c413

Please sign in to comment.