8170465: JNI exception pending in jni_util.c:190

8170466: JNI exception pending in jni_util.c:190

Reviewed-by: dholmes
This commit is contained in:
Naoto Sato 2016-12-07 08:54:56 -08:00
parent df8736b785
commit d4becc9ff1

View File

@ -201,12 +201,14 @@ JNU_ThrowByNameWithMessageAndLastError
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;