An incomplete fix for the NPE bugs in MultipleTermPositions.java

Details

Description

The fix revision 219387 (Fix for NPE (bug #35626). Fix by Hans Hjelm, test case by Scotty Allen.) was aimed to remove an NPE bug on the return value of "_termPositionsQueue.peek()" in the method "skipTo" of the file "/lucene/java/trunk/src/java/org/apache/lucene/index/MultipleTermPositions.java" , but it is incomplete.
Since the returned value "_termPositionsQueue.peek()" could be null during the run-time 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:

Activity

The fix revision 219387 was aimed to remove an NPE bug on the return value of "_termPositionsQueue.peek()" in the method "skipTo" of the file "/lucene/java/trunk/src/java/org/apache/lucene/index/MultipleTermPositions.java" , but it is incomplete.
Since the returned value "_termPositionsQueue.peek()" could be null during the run-time 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:

The fix revision 219387 (Fix for NPE (bug #35626). Fix by Hans Hjelm, test case by Scotty Allen.) was aimed to remove an NPE bug on the return value of "_termPositionsQueue.peek()" in the method "skipTo" of the file "/lucene/java/trunk/src/java/org/apache/lucene/index/MultipleTermPositions.java" , but it is incomplete.
Since the returned value "_termPositionsQueue.peek()" could be null during the run-time 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: