-
Enhancement
-
Resolution: Fixed
-
P4
-
23
-
None
To belatedly improve support for JEP 409 (JDK-8260514), include sealing information in Class.toGenericString().
See https://mail.openjdk.org/pipermail/core-libs-dev/2024-January/117400.html
The strictfp modifier was retired as a meaningful modifier in JDK 17 (JEP 306), the same release that JEP 409 sealed classes as added as a normal feature. So in terms of updating the implementation of toGenericString() to included sealed information, since strictfp is a no-op in the same release sealed/non-sealed was added, a class file can be
sealed XOR strictfp
Therefore, Class.toGenericString() could print the modifiers from getModifiers() and then add sealing information while retaining the blessed modifier order. In other words, the "Modifier.toString(modifiers)" code in Class.toGenericString() does not have to be "interrupted" to handle presenting sealed information in the blessed order.
See https://mail.openjdk.org/pipermail/core-libs-dev/2024-January/117400.html
The strictfp modifier was retired as a meaningful modifier in JDK 17 (JEP 306), the same release that JEP 409 sealed classes as added as a normal feature. So in terms of updating the implementation of toGenericString() to included sealed information, since strictfp is a no-op in the same release sealed/non-sealed was added, a class file can be
sealed XOR strictfp
Therefore, Class.toGenericString() could print the modifiers from getModifiers() and then add sealing information while retaining the blessed modifier order. In other words, the "Modifier.toString(modifiers)" code in Class.toGenericString() does not have to be "interrupted" to handle presenting sealed information in the blessed order.
- csr for
-
JDK-8322969 Including sealing information Class.toGenericString()
- Closed
- relates to
-
JDK-8322979 Add informative discussion to Modifier
- Resolved
-
JDK-8262807 Note assumptions of core reflection modeling and parameter handling
- Resolved
-
JDK-8260514 JEP 409: Sealed Classes
- Closed
-
JDK-8175916 JEP 306: Restore Always-Strict Floating-Point Semantics
- Closed
- links to
-
Commit openjdk/jdk/525063be
-
Review(master) openjdk/jdk/17239
(2 links to)