Community
Participate
Working Groups
3.1-RC2 test pass See bug 100795 for details. - have an empty .java file with the contents below (no line termination) - invoke code assist at the end of the first line "package org." The reported completion proposals specify a replace range of [8, 13), while the document length is only 12. Note that if there is a trailing space or a newline, the correct replace range is reported: [8, 12) Since jdt-ui does not check the replace ranges, we run into the IAE of StyledText eventually (see bug 100795 for the trace).
If this is an easy fix it would be nice to have it in 3.1. We proposed a more general fix in bug 100795 but this was turned down (see bug 100795 comment 6) and instead proposed to add a workaround for just this bug. I am against this and vote for adding the workaround/fix directly at the source.
*** Bug 100795 has been marked as a duplicate of this bug. ***
Scenario does not qualify for a stop ship defects. However symptoms are bad enough to make it a candidate for 3.1.1.
Not all completions at end of file are broken, e.g. the following works: public class ZZ { { Object o = o.<CODEASSIST HERE>
It needs override mode to misbehave, which isn't a default mode.
Created attachment 23830 [details] Proposed patch The support to extend the end of the empty completion token must be removed when the CompletionScanner in outside the source range (if the currentPosition is outside source range, there is no token after this point)
Fix released and test added. CompletionTests#testCompletionEmptyToken2()
Verified in 3.2M1 (I20050808-2000)
Verified for 3.1.1 using build M20050923-1430.