Apache Lucene open-source search software
SOLR-4218: SolrTestCaseJ4 throws NPE when closing the core (on the afterClass method)
Mark Robert Miller232aaa42ed3d
diff --git a/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java b/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.javaindex 32b173be2fc..9410f959a87 100644--- a/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java+++ b/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java@@ -162,12 +162,16 @@ public class HttpShardHandlerFactory extends ShardHandlerFactory implements Plug}try {- defaultClient.getConnectionManager().shutdown();+ if(defaultClient != null) {+ defaultClient.getConnectionManager().shutdown();+ }} catch (Throwable e) {SolrException.log(log, e);}try {- loadbalancer.shutdown();+ if(loadbalancer != null) {+ loadbalancer.shutdown();+ }} catch (Throwable e) {SolrException.log(log, e);}