RFR: JDK-8296743: Tighten Class.getModifiers spec for array classes [v3]

liach duke at openjdk.org
Fri Nov 18 20:32:30 UTC 2022


On Fri, 18 Nov 2022 18:12:56 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> Update the spec of Class.getModifiers to match long-standing behavior for primitive and array classes. Remove unneeded implementation flexibility with regard to setting other bit positions. This work was prompted to better support anticipated future Valhalla changes.
>> 
>> Please also review the CSR: https://bugs.openjdk.org/browse/JDK-8297237
>
> Joe Darcy has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Respond to review feedback.

In the new paragraph, the modifiers are sorted by their significance in bitwise representation, from least to most significant. Though `interface` bit comes between `final` and `abstract`. However, in the older previous paragraph, they are sorted by the blessed order in source (suggested by JLS). We can consider whether to unify these orders to both blessed or bitwise.

-------------

PR: https://git.openjdk.org/jdk/pull/11229


More information about the core-libs-dev mailing list