Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
|
Relates :
|
Name: gm110360 Date: 11/11/2002 FULL PRODUCT VERSION : jdk 1.4.1 and earlier versions FULL OPERATING SYSTEM VERSION : Win2000 A DESCRIPTION OF THE PROBLEM : jls states, that anonymous classes are implicit final. But it seems, the class-files are not marked as such. An anonymous class is compiled to a separate class-file named like SomeClass$1 . When I open this class-file with JBuilder, it is (somewhat) decompiled, but shows no 'final' modifier. Nothing prevents me to compile and run something like: Object o = new SomeClass$1() {}; in another class in the same package. I think, this is not intended. I don't have headache from this - but I just want to be sure, that the VM can immediatly use the fact, that an anonymous class (and it's methods) is final, without too much 'hotspotting'. Typical application of anonymous classes like comparators would immediatley benefit from this. I propose to explicitly mark class files compiled from anonymous classes as 'final'. REPRODUCIBILITY : This bug can be reproduced always. (Review ID: 166886) ======================================================================
|