Skip to content

Commit

Permalink
Fix REST Client proxy configuration when multiple clients exist
Browse files Browse the repository at this point in the history
(cherry picked from commit 2fd56d5)
  • Loading branch information
geoand authored and gsmet committed Sep 25, 2024
1 parent 7ab69dc commit 42fe3d8
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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()));
Expand All @@ -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<String> 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()));
Expand Down

0 comments on commit 42fe3d8

Please sign in to comment.