lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r1626534 - /lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
Date Sun, 21 Sep 2014 07:01:23 GMT
Author: noble
Date: Sun Sep 21 07:01:23 2014
New Revision: 1626534

URL: http://svn.apache.org/r1626534
Log:
SOLR-5474 NPE in tests

Modified:
    lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java?rev=1626534&r1=1626533&r2=1626534&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
(original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CloudSolrServer.java
Sun Sep 21 07:01:23 2014
@@ -703,7 +703,11 @@ public class CloudSolrServer extends Sol
 
       // if we experienced a communication error, it's worth checking the state
       // with ZK just to make sure the node we're trying to hit is still part of the collection
-      if (retryCount < MAX_STALE_RETRIES && !stateWasStale && !requestedCollections.isEmpty()
&& wasCommError) {
+      if (retryCount < MAX_STALE_RETRIES &&
+          !stateWasStale &&
+          requestedCollections != null &&
+          !requestedCollections.isEmpty() &&
+          wasCommError) {
         for (DocCollection ext : requestedCollections) {
           DocCollection latestStateFromZk = getDocCollection(zkStateReader.getClusterState(),
ext.getName());
           if (latestStateFromZk.getZNodeVersion() != ext.getZNodeVersion()) {



Mime
View raw message