8170465: JNI exception pending in jni_util.c:190
authornaoto
Wed, 07 Dec 2016 08:54:56 -0800
changeset 42442 0e6009a5b092
parent 42441 03cf95ffd04e
child 42443 b9b966ca4a58
8170465: JNI exception pending in jni_util.c:190 8170466: JNI exception pending in jni_util.c:190 Reviewed-by: dholmes
jdk/src/java.base/share/native/libjava/jni_util.c
--- a/jdk/src/java.base/share/native/libjava/jni_util.c	Wed Dec 07 10:55:13 2016 -0500
+++ b/jdk/src/java.base/share/native/libjava/jni_util.c	Wed Dec 07 08:54:56 2016 -0800
@@ -201,12 +201,14 @@
                 jio_snprintf(str1, messageextlen, " (%s)", message);
                 s2 = (*env)->NewStringUTF(env, str1);
                 free(str1);
+                JNU_CHECK_EXCEPTION(env);
                 if (s2 != NULL) {
                     jstring s3 = JNU_CallMethodByName(
                                      env, NULL, s, "concat",
                                      "(Ljava/lang/String;)Ljava/lang/String;",
                                      s2).l;
                     (*env)->DeleteLocalRef(env, s2);
+                    JNU_CHECK_EXCEPTION(env);
                     if (s3 != NULL) {
                         (*env)->DeleteLocalRef(env, s);
                         s = s3;