You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2017/05/02 08:25:52 UTC

lucene-solr:feature/autoscaling: SOLR-10278: avoid NPE

Repository: lucene-solr
Updated Branches:
  refs/heads/feature/autoscaling d81cc6c63 -> 83f8ed863


SOLR-10278: avoid NPE


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/83f8ed86
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/83f8ed86
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/83f8ed86

Branch: refs/heads/feature/autoscaling
Commit: 83f8ed8634fe9c27ef09ce6deb3742586a2138a2
Parents: d81cc6c
Author: Noble Paul <no...@apache.org>
Authored: Tue May 2 17:55:40 2017 +0930
Committer: Noble Paul <no...@apache.org>
Committed: Tue May 2 17:55:40 2017 +0930

----------------------------------------------------------------------
 .../org/apache/solr/client/solrj/impl/SolrClientDataProvider.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/83f8ed86/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientDataProvider.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientDataProvider.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientDataProvider.java
index 929563b..d283d7b 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientDataProvider.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/SolrClientDataProvider.java
@@ -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