Community
Participate
Working Groups
Build ID: I20070621-1340 Steps To Reproduce: The following code raises a compile error with the standard JDK: public final class Test { private final Object mObj; private final Object mDependent = new Object() { {Object o = mObj;} }; public Test() {mObj = "";} } More information: Expected result: Test.java:4: variable mObj might not have been initialized private final Object mMap = new Object() {{Object o = mObj;}}; ^
Reproduced with HEAD.
Added InitializationTest#test192-193, GenericTypeTest#test1163-1164.
Created attachment 78286 [details] Proposed patch
Indeed the check needs to be performed in nested initialization contexts as well.
Released for 3.4M2
Created attachment 78296 [details] Patch for 3.3.x
Verified for 3.4M2 using build I20070917-0010
considering for 3.3.2
Released for 3.3.2 Fixed
Only adding Verified for 3.4M2 to the status whiteboard, since I believe this got lost.
This is a bug we have had since day 1, but quite severe. Fix is safe.
+1 for 3.3.2
Verified for 3.3.2 using build M20080123-0800.