8170465: JNI exception pending in jni_util.c:190
8170466: JNI exception pending in jni_util.c:190
Reviewed-by: dholmes
--- 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;