You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2017/04/27 08:30:15 UTC

lucene-solr:feature/autoscaling: SOLR-10278: Actually use skipNulls flag

Repository: lucene-solr
Updated Branches:
  refs/heads/feature/autoscaling 4fccc59db -> 12933ee4a


SOLR-10278: Actually use skipNulls flag


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

Branch: refs/heads/feature/autoscaling
Commit: 12933ee4a75602eed790b8cc68e3c3312455c402
Parents: 4fccc59
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Thu Apr 27 14:00:02 2017 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Thu Apr 27 14:00:02 2017 +0530

----------------------------------------------------------------------
 solr/solrj/src/java/org/apache/solr/common/util/Utils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/12933ee4/solr/solrj/src/java/org/apache/solr/common/util/Utils.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/Utils.java b/solr/solrj/src/java/org/apache/solr/common/util/Utils.java
index 13aff60..7e92629 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/Utils.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/Utils.java
@@ -132,7 +132,7 @@ public class Utils {
     Map<String, Object> propMap = new LinkedHashMap<>(keyVals.length >> 1);
     for (int i = 0; i < keyVals.length; i += 2) {
       Object keyVal = keyVals[i + 1];
-      if(keyVal == null) continue;
+      if (skipNulls && keyVal == null) continue;
       propMap.put(keyVals[i].toString(), keyVal);
     }
     return propMap;