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

Dean Long dlong at openjdk.org
Wed Feb 19 02:38:03 UTC 2025


On Wed, 12 Feb 2025 12:05:22 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/reflect/Reflection.java line 59:
>> 
>>> 57:             Reflection.class, ALL_MEMBERS,
>>> 58:             AccessibleObject.class, ALL_MEMBERS,
>>> 59:             Class.class, Set.of("classLoader", "classData", "modifiers", "isPrimitive"),
>> 
>> I think the field is named `isPrimitive`, right?
>
> The method is isPrimitive so I think I had to give the field isPrimitiveType as a name, so this is wrong.

I don't know if we have a style guide that covers this, but I believe the method and field could both be named `isPrimitive`.

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

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


More information about the core-libs-dev mailing list