Skip to content

Commit

Permalink
Merge pull request quarkusio#38836 from michalvavrik/feature/kc-cl-re…
Browse files Browse the repository at this point in the history
…active-fix-msg-writer-priority

Fix Keycloak Admin Client Reactive Jackson reader provider priority so that the client can work when the JSONB REST client extension is present
  • Loading branch information
geoand committed Feb 19, 2024
2 parents 1fd7006 + 8c0c413 commit 1f3f42b
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 1f3f42b

Please sign in to comment.