On Wed, 2 Oct 2024 05:15:04 GMT, David Holmes <dhol...@openjdk.org> wrote:
> 3. I will just note that the description for this issue is "Clarify handling > of restricted and caller-sensitive methods" but there is nothing in the > proposed changes that relate to CS methods, and I think we have agreed that > any documentation that may be lacking for pre-existing CS methods should also > be handled outside this PR. https://download.java.net/java/early_access/jdk24/docs/specs/jni/design.html#calling-caller-sensitive-methods is the documentation about the invocation of a caller-sensitive method via JNI when there is no Java caller on the stack. CS methods do not behave in the same way, for example [some API throws NPE ](https://bugs.openjdk.org/browse/JDK-8281765) or [a default behavior ](https://bugs.openjdk.org/browse/JDK-8221618). We examined all CS methods and the API specification specifies the behavior (see [JDK-8177155](https://bugs.openjdk.org/browse/JDK-8177155)) when a CS method is invoked via JNI but no Java caller on the stack. I think the documentation is clear enough. ------------- PR Comment: https://git.openjdk.org/jdk/pull/21067#issuecomment-2394275395