8035419: warning from b09 for hotspot.agent.src.os.win32.windbg.sawindbg.cpp: 'JNI exception pending'
Summary: added missed exceptions checks
Reviewed-by: sla, sspitsyn
--- a/hotspot/agent/src/os/win32/windbg/sawindbg.cpp Thu Sep 04 08:48:53 2014 +0200
+++ b/hotspot/agent/src/os/win32/windbg/sawindbg.cpp Thu Sep 04 04:17:32 2014 -0700
@@ -112,7 +112,9 @@
return;}
static void throwNewDebuggerException(JNIEnv* env, const char* errMsg) {
- env->ThrowNew(env->FindClass("sun/jvm/hotspot/debugger/DebuggerException"), errMsg);
+ jclass clazz = env->FindClass("sun/jvm/hotspot/debugger/DebuggerException");
+ CHECK_EXCEPTION;
+ env->ThrowNew(clazz, errMsg);
}
/*
@@ -310,15 +312,18 @@
static bool setImageAndSymbolPath(JNIEnv* env, jobject obj) {
jboolean isCopy;
jclass clazz = env->GetObjectClass(obj);
+ CHECK_EXCEPTION_(false);
jstring path;
const char* buf;
path = (jstring) env->GetStaticObjectField(clazz, imagePath_ID);
+ CHECK_EXCEPTION_(false);
buf = env->GetStringUTFChars(path, &isCopy);
CHECK_EXCEPTION_(false);
AutoJavaString imagePath(env, path, buf);
path = (jstring) env->GetStaticObjectField(clazz, symbolPath_ID);
+ CHECK_EXCEPTION_(false);
buf = env->GetStringUTFChars(path, &isCopy);
CHECK_EXCEPTION_(false);
AutoJavaString symbolPath(env, path, buf);