On Thu, 6 Feb 2025 14:33:24 GMT, Alan Bateman <al...@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-...@users.noreply.github.com> >> - Update >> test/jdk/java/lang/reflect/AccessibleObject/TrySetAccessibleTest.java >> >> Co-authored-by: David Holmes >> <62092539+dholmes-...@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