From 2475e3999643554909b5d895012df8659bee5c9f Mon Sep 17 00:00:00 2001 From: Foivos Zakkak Date: Mon, 13 Nov 2023 11:35:05 +0200 Subject: [PATCH] Refactor: Simplify class names array creation (cherry picked from commit 94cf51115110b4f7d4449c8c8105d9e16d88db5c) --- .../reactive/deployment/JaxrsClientReactiveProcessor.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/extensions/resteasy-reactive/jaxrs-client-reactive/deployment/src/main/java/io/quarkus/jaxrs/client/reactive/deployment/JaxrsClientReactiveProcessor.java b/extensions/resteasy-reactive/jaxrs-client-reactive/deployment/src/main/java/io/quarkus/jaxrs/client/reactive/deployment/JaxrsClientReactiveProcessor.java index 96fdcf0c65fb1..cea258ce2771c 100644 --- a/extensions/resteasy-reactive/jaxrs-client-reactive/deployment/src/main/java/io/quarkus/jaxrs/client/reactive/deployment/JaxrsClientReactiveProcessor.java +++ b/extensions/resteasy-reactive/jaxrs-client-reactive/deployment/src/main/java/io/quarkus/jaxrs/client/reactive/deployment/JaxrsClientReactiveProcessor.java @@ -47,7 +47,6 @@ import java.util.function.Predicate; import java.util.function.Supplier; import java.util.regex.Pattern; -import java.util.stream.Collectors; import jakarta.ws.rs.ProcessingException; import jakarta.ws.rs.RuntimeType; @@ -287,8 +286,7 @@ void setupClientProxies(JaxrsClientReactiveRecorder recorder, scannedParameterContainers.addAll(parameterContainersBuildItem.getClassNames()); } reflectiveClassBuildItemBuildProducer.produce(ReflectiveClassBuildItem - .builder(scannedParameterContainers.stream().map(name -> name.toString()).collect(Collectors.toSet()) - .toArray(new String[0])) + .builder(scannedParameterContainers.stream().map(DotName::toString).distinct().toArray(String[]::new)) .methods().fields().build()); if (resourceScanningResultBuildItem.isEmpty()