Usage of Proxy.NO_PROXY prevents -Djava.net.useSystemProxies=true from kicking in

This commit is contained in:
Réda Housni Alaoui
2020-06-12 14:27:56 +02:00
parent 55c544c68b
commit 736dfffd04
2 changed files with 16 additions and 4 deletions
@@ -216,7 +216,7 @@ public final class ProxyUtil {
if (StringUtil.isBlank(host)) {
log.info("Using no proxy");
app.conn = new Connector(Proxy.NO_PROXY);
app.conn = new Connector();
} else {
int pp = StringUtil.isBlank(port) ? 80 : Integer.valueOf(port);
log.info("Using proxy", "host", host, "port", pp, "haveCreds", haveCreds);