Skip to content

Commit

Permalink
Trim port proxy setting string
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan.baricic authored and IvanBaricic committed Nov 27, 2024
1 parent e77760f commit 39a5776
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 39a5776

Please sign in to comment.