JDK-6520152 : ACC_FINAL flag for anonymous classes shouldn't be set
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
ACC_FINAL flag for an anonymous class was unset since JDK 1.3. This has
been changed in JDK 6 after bug 6219964 was fixed. For compatibility reason,
ACC_FINAL flag for anonymous classes should remain unset. See bug 4777101 for
Webrev is attached. It's also available at:
This is a regression introduced when bug 6219964 was fixed.
JLS 15.9.5 states that "An anonymous class is always implicitly final", which means
that an anonymous class cannot be subclassed. However, at class file level, we will
keep ACC_FINAL for anonymous classes unset to maintain compatibility with earlier