On Wed, 9 Oct 2024 17:28:09 GMT, Justin Lu <j...@openjdk.org> wrote:

> Please review this PR which fixes incorrect usage of `jthrowable 
> ExceptionOccurred(JNIEnv *env)` within _java.base_.
> 
> This corrects instances where the return value is being treated as a boolean. 
> Such occurrences are replaced with `jboolean ExceptionCheck(JNIEnv *env)`.

I think this is correct. `ExceptionOccurred` returns a local reference to a 
`Throwable` but it is used only in an implicit `!= NULL` check which is better 
served by the `jboolean` returned by `ExceptionCheck`.

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

Marked as reviewed by bpb (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/21428#pullrequestreview-2358283754

Reply via email to