RFR: 8349860: Make Class.isArray(), Class.isInterface() and Class.isPrimitive() non-native [v7]

Coleen Phillimore coleenp at openjdk.org
Mon Feb 24 19:30:41 UTC 2025


On Mon, 24 Feb 2025 19:06:30 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Use modifiers field directly in isInterface.
>
> src/java.base/share/classes/java/lang/Class.java line 241:
> 
>> 239:     private Class(ClassLoader loader, Class<?> arrayComponentType, char mods, ProtectionDomain pd, boolean isPrim) {
>> 240:         // Initialize final field for classLoader.  The initialization value of non-null
>> 241:         // prevents future JIT optimizations from assuming this final field is null.
> 
> To add a bit more depth to this comment, I'd add.
> 
> "The following assignments are done directly by the VM without calling this constructor."
> Or something to that effect.

Okay, that's a good comment.  I'll add it.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23572#discussion_r1968297499


More information about the core-libs-dev mailing list