From bb761ea3dc6718cbfab769e3724a3fb98214bf37 Mon Sep 17 00:00:00 2001 From: gsd Date: Sun, 13 Oct 2024 21:31:21 +0300 Subject: [PATCH] rkn fix 3 --- src/main/java/app/configurations/RestTemplateConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/app/configurations/RestTemplateConfig.java b/src/main/java/app/configurations/RestTemplateConfig.java index a4d8e6c..0f18a67 100644 --- a/src/main/java/app/configurations/RestTemplateConfig.java +++ b/src/main/java/app/configurations/RestTemplateConfig.java @@ -36,7 +36,7 @@ public class RestTemplateConfig { try { String[] proto_address = proxy.split("://"); - String[] address_port = proto_address[0].split(":"); + String[] address_port = proto_address[1].split(":"); int port = Integer.parseInt(address_port[1]); Proxy.Type type; @@ -63,7 +63,7 @@ public class RestTemplateConfig { logger.info("Create RestTemplate instants with proxy {}", proxy); return restTemplate; } catch (IndexOutOfBoundsException | NumberFormatException e) { - logger.error("PROXY_URL is setted but can't be splitted or parsed"); + logger.error("PROXY_URL is setted but can't be splitted or parsed", e); return getRestTemplate(); } }