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

Joe Darcy darcy at openjdk.org
Fri Nov 18 17:39:24 UTC 2022


On Fri, 18 Nov 2022 15:04:13 GMT, Roger Riggs <rriggs 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
>
> test/jdk/java/lang/Class/getModifiers/TestPrimitiveAndArrayModifiers.java line 73:
> 
>> 71:             int actualModifiers = arrayClass.getModifiers();
>> 72:             if (expectedModifiers != actualModifiers) {
>> 73:                 System.out.println("Expected " + Modifier.toString(expectedModifiers) +
> 
> Please include the name of the class being tested in the message.
> If the cause was included in the exception, it would appear in the jtreg summary without needing to read through the .jtr file.
> 
> Also for the primitive test below.

Good suggestion; will update.

> Please include the name of the class being tested in the message. If the cause was included in the exception, it would appear in the jtreg summary without needing to read through the .jtr file.
> 
> Also for the primitive test below.

Good suggestion; will update.

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

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


More information about the core-libs-dev mailing list