SOLR-5474 NPE in tests

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1626534 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2014-09-21 07:01:23 +00:00
parent 13c33c879d
commit 346e8f52bd
1 changed files with 5 additions and 1 deletions

View File

@ -703,7 +703,11 @@ public class CloudSolrServer extends SolrServer {
// 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()) {