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 413f546d4..0d26b03c2 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 @@ -106,6 +106,9 @@ public class PoolingClientConnectionManager implements ClientConnectionManager, if (schemeRegistry == null) { throw new IllegalArgumentException("Scheme registry may not be null"); } + if (dnsResolver == null) { + throw new IllegalArgumentException("DNS resolver may not be null"); + } this.schemeRegistry = schemeRegistry; this.dnsResolver = dnsResolver; this.operator = createConnectionOperator(schemeRegistry);