Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.0
-
None
-
New
Description
The fix revision 698487 was aimed to remove an NPE bug (LUCENE-1404) on the returned value of "min()" in the method "isPayloadAvailable" of the file "/lucene/java/trunk/src/java/org/apache/lucene/search/spans/NearSpansUnordered.java" , but it is incomplete.
Since the returned value "min()" could be null during the runtime execution, its value should also be null-checked before being dereferenced in other methods.
The buggy code locations the same fix needs to be applied at are as bellows:
Lines 159 , 170 , and 196 of the methods "next()"
Line 216 of the methods "skipTo()"
Line 230 of the methods "doc()"
230 public int doc()
Line 232 of the methods "start()"
232 public int start()
Line 315 of the methods "atMatch()"
private boolean atMatch()