Community
Participate
Working Groups
From bug 325481 comment 6 public class Test { public static void main() { String field1 = ""; String field2 = String.format(fie|); String field3 = "hello"; String field4 = ""; } } Completing at | proposes field2 which proposal if you accept you get an immediate compiler error.
Created attachment 181766 [details] proposed fix v1.0 + regression tests This fix is on the lines of the one done for bug 312603, except that for the latter it was done in InternalExtendedCompletionContext, which affects the proposed parameters when completing a method call inside a local's initialization. When directly completing, this fix should suffice. This makes use of the fact that a local variables initialization will only be non null when the completion is inside the initialization, else it will be set to null by consumeExitVariableWithInitialization().
Srikanth, please review. TIA
Looks good.
Released in HEAD for 3.7M4
Verified for 3.7M4 using build id I20101205-2000