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

ExE Boss duke at openjdk.org
Tue Jul 29 16:42:56 UTC 2025


On Tue, 29 Jul 2025 14:52:53 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Rename getRawClassAccessFlags to getClassFileAccessFlags and fix the test to reflect what the JVM does.
>
> src/java.base/share/classes/jdk/internal/reflect/Reflection.java line 87:
> 
>> 85:         class Holder {
>> 86:             static final JavaLangAccess JLA = SharedSecrets.getJavaLangAccess();
>> 87:         }
> 
> Yuck, another class and another shared secret.
> There's no need for a Holder class, just call SharedSecrets.getJavaLangAccess every time.
> It just returning a value from a static field.

Arguably, the fields in `SharedSecrets` should be made `@Stable`.

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

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


More information about the core-libs-dev mailing list