You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by dw...@apache.org on 2024/02/07 12:14:45 UTC
(lucene) branch branch_9x updated: Fix NPE in TestReqOptSumScorer.testFilterRandomRareOpt #13069
This is an automated email from the ASF dual-hosted git repository.
dweiss pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 29c14a75bb5 Fix NPE in TestReqOptSumScorer.testFilterRandomRareOpt #13069
29c14a75bb5 is described below
commit 29c14a75bb5398b30ab9f28e6c1cd82381b1ca52
Author: Zhang Chao <80...@qq.com>
AuthorDate: Wed Feb 7 20:14:01 2024 +0800
Fix NPE in TestReqOptSumScorer.testFilterRandomRareOpt #13069
---
.../src/java/org/apache/lucene/tests/search/CheckHits.java | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lucene/test-framework/src/java/org/apache/lucene/tests/search/CheckHits.java b/lucene/test-framework/src/java/org/apache/lucene/tests/search/CheckHits.java
index 217bd834d9e..9d708339d51 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/tests/search/CheckHits.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/tests/search/CheckHits.java
@@ -733,6 +733,9 @@ public class CheckHits {
assertTrue(s2 == null || s2.iterator().nextDoc() == DocIdSetIterator.NO_MORE_DOCS);
continue;
}
+ if (s2 == null) {
+ continue;
+ }
TwoPhaseIterator twoPhase1 = s1.twoPhaseIterator();
TwoPhaseIterator twoPhase2 = s2.twoPhaseIterator();
DocIdSetIterator approx1 = twoPhase1 == null ? s1.iterator() : twoPhase1.approximation();