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

Coleen Phillimore coleenp at openjdk.org
Thu Feb 6 16:14:19 UTC 2025


On Thu, 6 Feb 2025 14:33:24 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with three additional commits since the last revision:
>> 
>>  - 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.
>
> test/jdk/java/lang/reflect/AccessibleObject/TrySetAccessibleTest.java line 213:
> 
>> 211:             assertTrue(false);
>> 212:         } catch (NoSuchFieldException expected) { }
>> 213:     }
> 
> The test is about accessibility, it's checking for IllegalAccessException and InaccessibleObjectException. So not the right place to test that a field is hidden from core reflection. Can you look at test/jdk/internal/reflect/Reflection/Filtering.java as that is probably the right place to list the protectionDomain field.

Thank you Alan for letting me know the right place for this test.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23396#discussion_r1945012057


More information about the core-libs-dev mailing list