RFR: 8364187: Make getClassAccessFlagsRaw non-native [v3]

ExE Boss duke at openjdk.org
Tue Jul 29 22:11:58 UTC 2025


On Tue, 29 Jul 2025 19:58:10 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> This change removes the intrinsic for getClassAccessFlagsRaw for reflection and initializes an rawAccessFlags field in java.lang.Class instead, that Java code can non-natively access.
>> Tested with tier1-4.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Fix comments and remove Holder.

src/java.base/share/classes/jdk/internal/reflect/Reflection.java line 86:

> 84:     public static int getClassAccessFlags(Class<?> c) {
> 85:         JavaLangAccess JLA = SharedSecrets.getJavaLangAccess();
> 86:         return JLA.getClassFileAccessFlags(c);

Suggestion:

        return SharedSecrets.getJavaLangAccess().getClassFileAccessFlags(c);

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26517#discussion_r2241101969


More information about the core-libs-dev mailing list