From 0aca05311042045d34970da1fde2b2156bcd858d Mon Sep 17 00:00:00 2001 From: Noble Paul Date: Mon, 3 Oct 2016 15:06:35 +0530 Subject: [PATCH] SOLR-9588: more guava dependency --- .../org/apache/solr/client/solrj/impl/HttpClientUtil.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java index 96f4d823950..b8a6cd800d3 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java @@ -27,7 +27,6 @@ import java.util.List; import java.util.zip.GZIPInputStream; import java.util.zip.InflaterInputStream; -import com.google.common.collect.Lists; import org.apache.http.Header; import org.apache.http.HeaderElement; import org.apache.http.HttpEntity; @@ -50,7 +49,7 @@ import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.impl.client.DefaultHttpRequestRetryHandler; import org.apache.http.impl.client.SystemDefaultHttpClient; import org.apache.http.impl.conn.PoolingClientConnectionManager; -import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; // jdoc +import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager; import org.apache.http.params.HttpConnectionParams; import org.apache.http.protocol.HttpContext; import org.apache.solr.common.SolrException; @@ -60,6 +59,8 @@ import org.apache.solr.common.params.SolrParams; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static java.util.Collections.singletonList; + /** * Utility class for creating/configuring httpclient instances. */ @@ -95,7 +96,7 @@ public class HttpClientUtil { 0, false); private static final List configurers - = Collections.synchronizedList(Lists.newArrayList(new HttpClientConfigurer())); + = Collections.synchronizedList(new ArrayList<>(singletonList(new HttpClientConfigurer()))); private static final List interceptors = Collections.synchronizedList(new ArrayList<>());