Community
Participate
Working Groups
3.2 M3 candidate If CompletionScanner.getCurrentIdentifierSource() is not *always* called after getNextToken(), parser using this kind of scanner can enter in an infinite loop while scanning code! An example of this has been unfortunately noticed in CompletionJavadocParser, see bug 114901... Seems not to be a potential issue for CompletionParser which always calls CompletionScanner.getCurrentIdentifierSource method through consumeToken() after each getNextToken() call. That's why this potential issue was never noticed before.
The example of this defect is bug 114091 and not bug 114901
Created attachment 29863 [details] Proposed patch
Fixed and tests updated CompletionRecoveryTest#test14() CompletionRecoveryTest#test15()
*** Bug 116419 has been marked as a duplicate of this bug. ***
Reopen
Only the user of a CompletionScanner can known when the empty token is relevant or not. scanner.currentPosition, getNextToken() and getCurrentIdentifierSource() must be call in the correct sequence. mark bug as WONTFIX