SOLR-10278: avoid NPE

This commit is contained in:
Noble Paul 2017-05-02 17:55:40 +09:30
parent d81cc6c638
commit 83f8ed8634
1 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ import java.io.IOException;
import java.lang.invoke.MethodHandles;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@ -98,7 +99,7 @@ public class SolrClientDataProvider implements ClusterDataProvider {
@Override
public Map<String, Map<String, List<ReplicaInfo>>> getReplicaInfo(String node, Collection<String> keys) {
return data.get(node);//todo fill other details
return data.getOrDefault(node, Collections.emptyMap());//todo fill other details
}
@Override