JDK-6520152 : ACC_FINAL flag for anonymous classes shouldn't be set
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 6,6u26
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,linux
  • CPU: generic,x86
  • Submitted: 2007-02-01
  • Updated: 2017-05-16
  • Resolved: 2011-05-17
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.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u4Fixed 7 b18Fixed OpenJDK6Resolved
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
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 
more information.

Comments
SUGGESTED FIX Webrev is attached. It's also available at: http://sa.sfbay.sun.com/projects/langtools_data/7/6520152/
20-07-2007

EVALUATION 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 releases.
01-02-2007