mirror of https://github.com/apache/lucene.git
SOLR-12877: avoid NPE in TestUtilizeNode.getReplicaList
This commit is contained in:
parent
15002eba2f
commit
d2f7272b0e
|
@ -170,11 +170,13 @@ public class TestUtilizeNode extends SolrCloudTestCase {
|
|||
.getClusterState().getCollectionOrNull(collectionName, false);
|
||||
|
||||
List<Replica> results = new ArrayList<>(3);
|
||||
collection.forEachReplica((s, replica) -> {
|
||||
if (collection != null) {
|
||||
collection.forEachReplica((s, replica) -> {
|
||||
if (replica.getNodeName().equals(jettyNode.getNodeName())) {
|
||||
results.add(replica);
|
||||
}
|
||||
});
|
||||
results.add(replica);
|
||||
}
|
||||
});
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue