RFR: 8341794: Fix ExceptionOccurred in jdk.attach
Justin Lu
jlu at openjdk.org
Thu Oct 10 22:00:45 UTC 2024
Please review this PR which is part of the bigger umbrella bug: https://bugs.openjdk.org/browse/JDK-8341542.
This fixes incorrect usage of `jthrowable ExceptionOccurred(JNIEnv *env)` within _jdk.attach_.
This corrects instances where the return value is being treated as a boolean. Such occurrences are replaced with `jboolean ExceptionCheck(JNIEnv *env)`.
JNI Docs - ExceptionCheck
> We introduce a convenience function to check for pending exceptions without creating a local reference to the exception object. ... Returns JNI_TRUE when there is a pending exception; otherwise, returns JNI_FALSE.
-------------
Commit messages:
- init
Changes: https://git.openjdk.org/jdk/pull/21459/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=21459&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8341794
Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/21459.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/21459/head:pull/21459
PR: https://git.openjdk.org/jdk/pull/21459
More information about the serviceability-dev
mailing list