-
Bug
-
Resolution: Fixed
-
P4
-
19
JVMS 4.7.2 describes the runtime behavior of the ConstantValue attribute by talking about how the attribute is used to initialize static fields. It fails to mention that the fields must also be final (per 5.5). This leaves the false impression that a non-final static field could be initialized with a ConstantValue attribute.
- relates to
-
JDK-8344778 javac is not generating the ConstantValue attribute for non-final static fields
- Open
-
JDK-8322506 5.5: eliminate initialization dependency on java.lang.Class
- Resolved