RFR: JDK-8296743: Tighten Class.getModifiers spec for array classes
Dan Heidinga
heidinga at openjdk.org
Fri Nov 18 15:51:14 UTC 2022
On Fri, 18 Nov 2022 03:26:38 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
src/java.base/share/classes/java/lang/Class.java line 1306:
> 1304: * {@code true}
> 1305: * <li> its interface modifier is always {@code false}, event when
> 1306: * the component type is an interface
Should this mention that all array classes will also have their `abstract` modifier set? The test cases seem to confirm that it's expected but we haven't stated it explicitly here.
-------------
PR: https://git.openjdk.org/jdk/pull/11229
More information about the core-libs-dev
mailing list