Said flag should be implicitly cleared when returning to Java frame.
That is, native code which makes a call normally requiring an exception check (e.g. calling Java method), does not need to check for exceptions if said code calls no other JNI API. Returning to Java frame should clear the pending check flag (for -Xcheck:jni warnings) and allow the exception to propagate to Java code as per normal.
Without this fix, there are quite a number of false warnings produced by core-library native code, causing some noise during JVM testing and when users need -Xcheck:jni
- relates to
-
JDK-8160614 Some of the checked JNI improvements are excessively verbose
-
- Closed
-
-
JDK-8043224 -Xcheck:jni improvements to exception checking and excessive local refs
-
- Closed
-