lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r1672402 - /lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/DocSlice.java
Date Thu, 09 Apr 2015 15:49:13 GMT
Author: shalin
Date: Thu Apr  9 15:49:12 2015
New Revision: 1672402

URL: http://svn.apache.org/r1672402
Log:
SOLR-7371: Fix NPE when scores are null

Modified:
    lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/DocSlice.java

Modified: lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/DocSlice.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/DocSlice.java?rev=1672402&r1=1672401&r2=1672402&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/DocSlice.java (original)
+++ lucene/dev/trunk/solr/core/src/java/org/apache/solr/search/DocSlice.java Thu Apr  9 15:49:12
2015
@@ -59,7 +59,7 @@ public class DocSlice extends DocSetBase
     this.scores=scores;
     this.matches=matches;
     this.maxScore=maxScore;
-    this.ramBytesUsed = BASE_RAM_BYTES_USED + RamUsageEstimator.sizeOf(docs) + RamUsageEstimator.sizeOf(scores);
+    this.ramBytesUsed = BASE_RAM_BYTES_USED + RamUsageEstimator.sizeOf(docs) + (scores !=
null ? RamUsageEstimator.sizeOf(scores) : 0);
   }
 
   @Override



Mime
View raw message