RFR: 8349145: Make Class.getProtectionDomain() non-native [v7]

Alan Bateman alanb at openjdk.org
Wed Feb 12 07:36:13 UTC 2025


On Mon, 10 Feb 2025 13:23:49 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> This change removes the native call and injected field for ProtectionDomain in the java.lang.Class instance, and moves the field to be declared in Java.
>> Tested with tier1-4.
>
> Coleen Phillimore has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 11 commits:
> 
>  - Merge branch 'master' into protection-domain
>  - Move test for protectionDomain filtering.
>  - Update test/jdk/java/lang/reflect/AccessibleObject/TrySetAccessibleTest.java
>    
>    Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com>
>  - Update test/jdk/java/lang/reflect/AccessibleObject/TrySetAccessibleTest.java
>    
>    Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com>
>  - Remove @Stable annotation for final field.
>  - Fix test that knows which fields are hidden from reflection in jvmci.
>  - Hide Class.protectionDomain for reflection and add a test case.
>  - Merge branch 'master' into protection-domain
>  - Fix two tests.
>  - Fix the test.
>  - ... and 1 more: https://git.openjdk.org/jdk/compare/c9cadbd2...2208302c

This looks okay. There will be some follow-up cleanup needed in the libs code, e.g.JLA.protectionDomain(Class) can go away, something for future PRs.

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

PR Comment: https://git.openjdk.org/jdk/pull/23396#issuecomment-2652874791


More information about the core-libs-dev mailing list