Details
-
Bug
-
Resolution: Fixed
-
P4
-
19
Description
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.