8035855: [parfait] JNI exception pending in jdk/src/windows/native/sun/windows/awt_DataTransferer.cpp
Reviewed-by: anthony, serb
--- a/jdk/src/windows/native/sun/windows/awt_DataTransferer.cpp Wed Feb 26 11:55:45 2014 +0400
+++ b/jdk/src/windows/native/sun/windows/awt_DataTransferer.cpp Thu Feb 27 16:11:16 2014 +0400
@@ -274,6 +274,9 @@
jclass str_clazz = env->FindClass("java/lang/String");
DASSERT(str_clazz != NULL);
+ if (str_clazz == NULL) {
+ throw std::bad_alloc();
+ }
jobjectArray filenames = env->NewObjectArray(nFilenames, str_clazz,
NULL);
if (filenames == NULL) {
@@ -827,6 +830,7 @@
TRY;
LPCTSTR cStr = JNU_GetStringPlatformChars(env, str, NULL);
+ CHECK_NULL_RETURN(cStr, 0);
jlong value = ::RegisterClipboardFormat(cStr);
JNU_ReleaseStringPlatformChars(env, str, cStr);