RFR: JDK-8296743: Tighten Class.getModifiers spec for array classes [v2]
Mandy Chung
mchung at openjdk.org
Fri Nov 18 17:47:59 UTC 2022
On Fri, 18 Nov 2022 17:46:33 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.
Same change should also be applied to `Class::accessFlags`?
src/java.base/share/classes/java/lang/Class.java line 1305:
> 1303: * <li> its {@code final} modifier is always
> 1304: * {@code true}
> 1305: * <li> its interface modifier is always {@code false}, event when
typo: s/event/even/
src/java.base/share/classes/java/lang/Class.java line 1311:
> 1309: * void, its {@code public}, {@code abstract}, and {@code final}
> 1310: * modifiers are always {@code true}.
> 1311: * For class objects representing void, primitive types, and
Suggestion:
* For {@code Class} objects representing void, primitive types, and
-------------
PR: https://git.openjdk.org/jdk/pull/11229
More information about the core-libs-dev
mailing list