diff --git a/extensions/resteasy-reactive/rest-client/runtime/src/main/java/io/quarkus/rest/client/reactive/runtime/ProxyAddressUtil.java b/extensions/resteasy-reactive/rest-client/runtime/src/main/java/io/quarkus/rest/client/reactive/runtime/ProxyAddressUtil.java index d2a8b55c2f98b4..18cd0d3f4e3b46 100644 --- a/extensions/resteasy-reactive/rest-client/runtime/src/main/java/io/quarkus/rest/client/reactive/runtime/ProxyAddressUtil.java +++ b/extensions/resteasy-reactive/rest-client/runtime/src/main/java/io/quarkus/rest/client/reactive/runtime/ProxyAddressUtil.java @@ -12,7 +12,7 @@ public static HostAndPort parseAddress(String proxyString) { String host = proxyString.substring(0, lastColonIndex); int port; try { - port = Integer.parseInt(proxyString.substring(lastColonIndex + 1)); + port = Integer.parseInt(proxyString.trim().substring(lastColonIndex + 1)); } catch (NumberFormatException e) { throw new RuntimeException("Invalid proxy setting. The port is not a number in '" + proxyString + "'", e); }