changeset 16216:26c1193265d6

8170465: JNI exception pending in jni_util.c:190 8170466: JNI exception pending in jni_util.c:190 Reviewed-by: dholmes
author naoto
date Wed, 07 Dec 2016 08:54:56 -0800
parents b9cdffb87bea
children 54378adce7f1
files src/java.base/share/native/libjava/jni_util.c
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/native/libjava/jni_util.c	Wed Dec 07 10:55:13 2016 -0500
+++ b/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;