--- a/jdk/src/jdk.jdwp.agent/share/native/libjdwp/StringReferenceImpl.c Thu Mar 05 09:38:45 2015 +0000
+++ b/jdk/src/jdk.jdwp.agent/share/native/libjdwp/StringReferenceImpl.c Thu Mar 05 05:06:00 2015 -0800
@@ -46,8 +46,10 @@
char *utf;
utf = (char *)JNI_FUNC_PTR(env,GetStringUTFChars)(env, string, NULL);
- (void)outStream_writeString(out, utf);
- JNI_FUNC_PTR(env,ReleaseStringUTFChars)(env, string, utf);
+ if (!(*env)->ExceptionCheck(env)) {
+ (void)outStream_writeString(out, utf);
+ JNI_FUNC_PTR(env,ReleaseStringUTFChars)(env, string, utf);
+ }
} END_WITH_LOCAL_REFS(env);