From de967998f3aec60855cdfc461faa65d300bc32a9 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Thu, 8 Apr 2021 21:38:57 +0300 Subject: [PATCH] Fix build issue when client and server RESTEasy Reactive jackson deps are used together --- ...activeJacksonProviderDefinedBuildItem.java | 2 +- .../RestClientReactiveJacksonProcessor.java | 2 +- .../micrometer-prometheus/pom.xml | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/extensions/resteasy-reactive/quarkus-resteasy-reactive-jackson-common/deployment/src/main/java/io/quarkus/resteasy/reactive/jackson/deployment/processor/ResteasyReactiveJacksonProviderDefinedBuildItem.java b/extensions/resteasy-reactive/quarkus-resteasy-reactive-jackson-common/deployment/src/main/java/io/quarkus/resteasy/reactive/jackson/deployment/processor/ResteasyReactiveJacksonProviderDefinedBuildItem.java index 23fbb2d32db0e..bab510942c126 100644 --- a/extensions/resteasy-reactive/quarkus-resteasy-reactive-jackson-common/deployment/src/main/java/io/quarkus/resteasy/reactive/jackson/deployment/processor/ResteasyReactiveJacksonProviderDefinedBuildItem.java +++ b/extensions/resteasy-reactive/quarkus-resteasy-reactive-jackson-common/deployment/src/main/java/io/quarkus/resteasy/reactive/jackson/deployment/processor/ResteasyReactiveJacksonProviderDefinedBuildItem.java @@ -6,6 +6,6 @@ * A BuildItem to mark that the server side jackson provider is defined. * If not "emitted" by any of the processors, the reactive rest client (if used) will add its own jackson provider */ -public class ResteasyReactiveJacksonProviderDefinedBuildItem extends MultiBuildItem { +public final class ResteasyReactiveJacksonProviderDefinedBuildItem extends MultiBuildItem { } diff --git a/extensions/resteasy-reactive/rest-client-reactive-jackson/deployment/src/main/java/io/quarkus/rest/client/reactive/jackson/deployment/RestClientReactiveJacksonProcessor.java b/extensions/resteasy-reactive/rest-client-reactive-jackson/deployment/src/main/java/io/quarkus/rest/client/reactive/jackson/deployment/RestClientReactiveJacksonProcessor.java index 45404564edf84..c2eae37a9e5bf 100644 --- a/extensions/resteasy-reactive/rest-client-reactive-jackson/deployment/src/main/java/io/quarkus/rest/client/reactive/jackson/deployment/RestClientReactiveJacksonProcessor.java +++ b/extensions/resteasy-reactive/rest-client-reactive-jackson/deployment/src/main/java/io/quarkus/rest/client/reactive/jackson/deployment/RestClientReactiveJacksonProcessor.java @@ -36,7 +36,7 @@ void additionalProviders( BuildProducer additionalBean, BuildProducer additionalReaders, BuildProducer additionalWriters) { - if (jacksonProviderDefined != null && !jacksonProviderDefined.isEmpty()) { + if (!jacksonProviderDefined.isEmpty()) { return; } // make these beans to they can get instantiated with the Quarkus CDI configured Jsonb object diff --git a/integration-tests/micrometer-prometheus/pom.xml b/integration-tests/micrometer-prometheus/pom.xml index 6d2108d9902e0..89524ec533a32 100644 --- a/integration-tests/micrometer-prometheus/pom.xml +++ b/integration-tests/micrometer-prometheus/pom.xml @@ -36,6 +36,12 @@ quarkus-resteasy-reactive-jackson + + + io.quarkus + quarkus-rest-client-reactive-jackson + + io.quarkus @@ -115,6 +121,19 @@ + + io.quarkus + quarkus-rest-client-reactive-jackson-deployment + ${project.version} + pom + test + + + * + * + + + io.quarkus quarkus-kubernetes-deployment