SOLR-4218: SolrTestCaseJ4 throws NPE when closing the core (on the afterClass method)

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1423932 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-12-19 16:41:18 +00:00
parent aa695debba
commit 232aaa42ed
1 changed files with 6 additions and 2 deletions

View File

@ -162,12 +162,16 @@ public class HttpShardHandlerFactory extends ShardHandlerFactory implements Plug
} }
try { try {
if(defaultClient != null) {
defaultClient.getConnectionManager().shutdown(); defaultClient.getConnectionManager().shutdown();
}
} catch (Throwable e) { } catch (Throwable e) {
SolrException.log(log, e); SolrException.log(log, e);
} }
try { try {
if(loadbalancer != null) {
loadbalancer.shutdown(); loadbalancer.shutdown();
}
} catch (Throwable e) { } catch (Throwable e) {
SolrException.log(log, e); SolrException.log(log, e);
} }