On Mon, 10 Nov 2025 20:24:53 GMT, Chen Liang <[email protected]> wrote:

> I still wonder about the decision for JNI to call final Field.set with an 
> unconditional export check instead of an unconditional open check - the open 
> check is done for all Java code already.

It's aligned with setAccessible. It's a bit of corner case, but if a JNI 
attached thread invokes setAccessible with no java frames on the stack, then it 
specified to only succeed if the API element is public and declared in a public 
class in an exported package.

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

PR Comment: https://git.openjdk.org/jdk/pull/25115#issuecomment-3515650487

Reply via email to