lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r908094 - /lucene/solr/branches/cloud/src/solrj/org/apache/solr/client/solrj/impl/CloudSolrServer.java
Date Tue, 09 Feb 2010 16:08:54 GMT
Author: yonik
Date: Tue Feb  9 16:08:53 2010
New Revision: 908094

URL: http://svn.apache.org/viewvc?rev=908094&view=rev
Log:
fix NPE on close

Modified:
    lucene/solr/branches/cloud/src/solrj/org/apache/solr/client/solrj/impl/CloudSolrServer.java

Modified: lucene/solr/branches/cloud/src/solrj/org/apache/solr/client/solrj/impl/CloudSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/solrj/org/apache/solr/client/solrj/impl/CloudSolrServer.java?rev=908094&r1=908093&r2=908094&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/solrj/org/apache/solr/client/solrj/impl/CloudSolrServer.java
(original)
+++ lucene/solr/branches/cloud/src/solrj/org/apache/solr/client/solrj/impl/CloudSolrServer.java
Tue Feb  9 16:08:53 2010
@@ -125,7 +125,12 @@
   }
 
   public void close() {
-    zkController.close();
-    zkController = null;
+    if (zkController != null) {
+      synchronized(this) {
+        if (zkController != null)
+          zkController.close();
+        zkController = null;
+      }
+    }
   }
 }



Mime
View raw message