United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6520152 ACC_FINAL flag for anonymous classes shouldn't be set
JDK-6520152 : ACC_FINAL flag for anonymous classes shouldn't be set

Details
Type:
Bug
Submit Date:
2007-02-01
Status:
Closed
Updated Date:
2014-02-09
Project Name:
JDK
Resolved Date:
2011-05-17
Component:
tools
OS:
linux,generic
Sub-Component:
javac
CPU:
x86,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
6,6u26
Fixed Versions:

Related Reports
Backport:
Backport:
Duplicate:
Relates:
Relates:
Relates:

Sub Tasks

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
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.
                                     
2007-02-01
SUGGESTED FIX

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



Hardware and Software, Engineered to Work Together