changeset 23633:d70e85ad28b4

8035847: [parfait] JNI exception pending in jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp Reviewed-by: anthony, serb
author pchelko
date Tue, 11 Mar 2014 11:51:14 +0400
parents cd7a34d12e8c
children 42644b4586e9
files jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp	Mon Mar 10 13:54:25 2014 -0700
+++ b/jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp	Tue Mar 11 11:51:14 2014 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -132,6 +132,7 @@
     JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
     if (m_cStrW > 0) {
         m_jtext = MakeJavaString(env, m_lpStrW, m_cStrW);
+        JNU_CHECK_EXCEPTION_RETURN(env, -1);
     }
 
     // Merge the string if necessary
@@ -251,6 +252,13 @@
             } else {
                 readingClauseW[cls] = MakeJavaString(env, lpHWStrW, cHWStrW);
             }
+            if (env->ExceptionCheck()) {
+                lpBndClauseW = NULL;
+                lpReadingClauseW = NULL;
+                delete [] bndClauseW;
+                delete [] readingClauseW;
+                return 0;
+            }
         }
         else {
             readingClauseW[cls] = NULL;