From 960ee2f581467b7f686a69602dc7aa92565e46a8 Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Mon, 10 Oct 2011 20:18:24 +0000 Subject: [PATCH] HTTPCLIENT-1123: fixed broken PoolingClientConnectionManager constructor git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1181208 13f79535-47bb-0310-9956-ffa450edef68 --- .../impl/conn/PoolingClientConnectionManager.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/httpclient/src/main/java/org/apache/http/impl/conn/PoolingClientConnectionManager.java b/httpclient/src/main/java/org/apache/http/impl/conn/PoolingClientConnectionManager.java index 7108d14bd..413f546d4 100644 --- a/httpclient/src/main/java/org/apache/http/impl/conn/PoolingClientConnectionManager.java +++ b/httpclient/src/main/java/org/apache/http/impl/conn/PoolingClientConnectionManager.java @@ -96,14 +96,7 @@ public class PoolingClientConnectionManager implements ClientConnectionManager, public PoolingClientConnectionManager( final SchemeRegistry schemeRegistry, final long timeToLive, final TimeUnit tunit) { - super(); - if (schemeRegistry == null) { - throw new IllegalArgumentException("Scheme registry may not be null"); - } - this.schemeRegistry = schemeRegistry; - this.dnsResolver = new SystemDefaultDnsResolver(); - this.operator = createConnectionOperator(schemeRegistry); - this.pool = new HttpConnPool(this.log, 2, 20, timeToLive, tunit); + this(schemeRegistry, timeToLive, tunit, new SystemDefaultDnsResolver()); } public PoolingClientConnectionManager(final SchemeRegistry schemeRegistry, @@ -114,7 +107,7 @@ public class PoolingClientConnectionManager implements ClientConnectionManager, throw new IllegalArgumentException("Scheme registry may not be null"); } this.schemeRegistry = schemeRegistry; - this.dnsResolver = new SystemDefaultDnsResolver(); + this.dnsResolver = dnsResolver; this.operator = createConnectionOperator(schemeRegistry); this.pool = new HttpConnPool(this.log, 2, 20, timeToLive, tunit); }