RFR: 8285397: JNI exception pending in CUPSfuncs.c:250
Prasanta Sadhukhan
psadhukhan at openjdk.java.net
Mon May 2 07:22:45 UTC 2022
On Sun, 1 May 2022 19:31:01 GMT, Phil Race <prr at openjdk.org> wrote:
> A tool checking for JNI errors complains that the call to JNU_NewStringPlatform(..)
> might throw an exception and subsequent JNI code isn't making sure of that.
> Clear the exception so the error handling code can do its thing.
src/java.desktop/unix/native/common/awt/CUPSfuncs.c line 249:
> 247: utf_str = JNU_NewStringPlatform(env, dests[i].name);
> 248: if (utf_str == NULL) {
> 249: (*env)->ExceptionClear(env);
Shouldn't we also need to do same in https://github.com/openjdk/jdk/blob/master/src/java.desktop/unix/native/common/awt/CUPSfuncs.c#L357, L367, L381 since we do at L348
-------------
PR: https://git.openjdk.java.net/jdk/pull/8491
More information about the client-libs-dev
mailing list