-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
P4
-
Affects Version/s: repo-valhalla
-
Component/s: specification
Current text in the JEP 401 JVM spec change document:
-----
If the ACC_INTERFACE flag is not set, any of the other flags in Table 4.1-B may be set except ACC_ANNOTATION and ACC_MODULE. However, such a class file must have at least one of its ACC_FINAL, ACC_IDENTITY, or ACC_ABSTRACT flags set, and must not have both its ACC_FINAL and ACC_ABSTRACT flags set (JLS §8.1.1.2).
In a class file with version number 70.65535, the ACC_IDENTITY flag indicates that the class is an identity class (2.4). If the ACC_IDENTITY flag of a class is not set, the class is a value class.
In a class file with any other version number, the 0x0020 bit is ignored; if the class file defines a class, the ACC_IDENTITY flag is considered to be set and the class is an identity class.
-----
Because of the sequencing, it's unclear whether the "at least one" rule applies to the class file bits, or the ACC_IDENTITY flag that is "considered to be set". Need to clarify that a class file with "any other version number" is not required to set any of the three bits explicitly (although, due to the ACC_SUPER recommendation, they will typically have done so).
-----
If the ACC_INTERFACE flag is not set, any of the other flags in Table 4.1-B may be set except ACC_ANNOTATION and ACC_MODULE. However, such a class file must have at least one of its ACC_FINAL, ACC_IDENTITY, or ACC_ABSTRACT flags set, and must not have both its ACC_FINAL and ACC_ABSTRACT flags set (JLS §8.1.1.2).
In a class file with version number 70.65535, the ACC_IDENTITY flag indicates that the class is an identity class (2.4). If the ACC_IDENTITY flag of a class is not set, the class is a value class.
In a class file with any other version number, the 0x0020 bit is ignored; if the class file defines a class, the ACC_IDENTITY flag is considered to be set and the class is an identity class.
-----
Because of the sequencing, it's unclear whether the "at least one" rule applies to the class file bits, or the ACC_IDENTITY flag that is "considered to be set". Need to clarify that a class file with "any other version number" is not required to set any of the three bits explicitly (although, due to the ACC_SUPER recommendation, they will typically have done so).