From 42fe3d8184774e713af8260889704b5af313668e Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Mon, 16 Sep 2024 11:26:19 +0300 Subject: [PATCH] Fix REST Client proxy configuration when multiple clients exist (cherry picked from commit 2fd56d524dfdbcaaf249d325b5310609bbf47a99) --- .../DevServicesRestClientHttpProxyProcessor.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extensions/resteasy-reactive/rest-client/deployment/src/main/java/io/quarkus/rest/client/reactive/deployment/devservices/DevServicesRestClientHttpProxyProcessor.java b/extensions/resteasy-reactive/rest-client/deployment/src/main/java/io/quarkus/rest/client/reactive/deployment/devservices/DevServicesRestClientHttpProxyProcessor.java index 9a68ff95ae88d..9817fa8148b93 100644 --- a/extensions/resteasy-reactive/rest-client/deployment/src/main/java/io/quarkus/rest/client/reactive/deployment/devservices/DevServicesRestClientHttpProxyProcessor.java +++ b/extensions/resteasy-reactive/rest-client/deployment/src/main/java/io/quarkus/rest/client/reactive/deployment/devservices/DevServicesRestClientHttpProxyProcessor.java @@ -68,7 +68,7 @@ public void determineRequiredProxies(RestClientsBuildTimeConfig restClientsBuild for (var configEntry : configs.entrySet()) { if (!configEntry.getValue().enableLocalProxy()) { log.trace("Ignoring config key: '" + configEntry.getKey() + "' because enableLocalProxy is false"); - break; + continue; } String configKey = configEntry.getKey(); @@ -91,7 +91,7 @@ public void determineRequiredProxies(RestClientsBuildTimeConfig restClientsBuild if (baseUri.isEmpty()) { log.debug("Unable to determine uri or url for config key '" + configKey + "'"); - break; + continue; } producer.produce(new RestClientHttpProxyBuildItem(matchingBI.getClassInfo().name().toString(), baseUri.get(), configEntry.getValue().localProxyProvider())); @@ -101,14 +101,14 @@ public void determineRequiredProxies(RestClientsBuildTimeConfig restClientsBuild if (classInfo == null) { log.debug( "Key '" + configKey + "' could not be matched to either a class name or a REST Client's configKey"); - break; + continue; } Optional baseUri = oneOf( Optional.ofNullable(restClientValues.get("uri")), Optional.ofNullable(restClientValues.get("url"))); if (baseUri.isEmpty()) { log.debug("Unable to determine uri or url for config key '" + configKey + "'"); - break; + continue; } producer.produce(new RestClientHttpProxyBuildItem(classInfo.name().toString(), baseUri.get(), configEntry.getValue().localProxyProvider()));