-
Bug
-
Resolution: Fixed
-
P3
-
7u4
-
b08
-
Verified
Oracle's implementation returns "static" for anonymous classes, which
contradicts the spec.
Java 7 spec:
An anonymous class is always implicitly final (8.1.1.2).
An anonymous class is always an inner class (8.1.3); it is never
static (8.1.1, 8.5.1).
The modifier static pertains only to member classes (8.5.1), not to
top level or local or anonymous classes.
contradicts the spec.
Java 7 spec:
An anonymous class is always implicitly final (8.1.1.2).
An anonymous class is always an inner class (8.1.3); it is never
static (8.1.1, 8.5.1).
The modifier static pertains only to member classes (8.5.1), not to
top level or local or anonymous classes.
- duplicates
-
JDK-8146064 javac allows empty enum inside anonymous class in static method
- Closed
-
JDK-8055235 Anonymous class modifier is incorrect
- Closed
- relates to
-
JDK-6520152 ACC_FINAL flag for anonymous classes shouldn't be set
- Closed
-
JDK-6219964 Compiler allows illegal cast of anonymous inner class
- Closed
-
JDK-4777101 final treatment of anonymous classes not marked in .class files?
- Closed