Community
Participate
Working Groups
Build ID: M20060921-0945 Steps To Reproduce: 1. Define a class with a final field 2. Give it a constructor which takes an instance of the same class 3. In the constructor, "initialize" the final field belonging to the passed-in instance instead of this. Or better, just see the attached file. More information: A constructor can "initialize" a final field of another instance instead of the field in the instance being created. The attached program compiles with Eclipse, and allows a final field to be overwritten; Both Sun's javac and gcj refuse to compile it.
Created attachment 69648 [details] a class that can break DA/DU as implemented in ECJ
This is a dup of bug 151787, which was addressed for 3.3M7. A 3.2 patch was issued, pls find it under: http://www.eclipse.org/jdt/core/r3.2/index.php#UPDATES or directly get the patch at: http://www.eclipse.org/jdt/core/patches/org.eclipse.jdt.core_3.2.3.z20070503-1623.jar *** This bug has been marked as a duplicate of bug 151787 ***