提交 9fc3229d 编写于 作者: P pchelko

8035847: [parfait] JNI exception pending in...

8035847: [parfait] JNI exception pending in jdk/src/windows/native/sun/windows/awt_InputTextInfor.cpp
Reviewed-by: anthony, serb
上级 bce13ea1
/* /*
* 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. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -132,6 +132,7 @@ AwtInputTextInfor::GetContextData(HIMC hIMC, const LPARAM flags) { ...@@ -132,6 +132,7 @@ AwtInputTextInfor::GetContextData(HIMC hIMC, const LPARAM flags) {
JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2); JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
if (m_cStrW > 0) { if (m_cStrW > 0) {
m_jtext = MakeJavaString(env, m_lpStrW, m_cStrW); m_jtext = MakeJavaString(env, m_lpStrW, m_cStrW);
JNU_CHECK_EXCEPTION_RETURN(env, -1);
} }
// Merge the string if necessary // Merge the string if necessary
...@@ -251,6 +252,13 @@ int AwtInputTextInfor::GetClauseInfor(int*& lpBndClauseW, jstring*& lpReadingCla ...@@ -251,6 +252,13 @@ int AwtInputTextInfor::GetClauseInfor(int*& lpBndClauseW, jstring*& lpReadingCla
} else { } else {
readingClauseW[cls] = MakeJavaString(env, lpHWStrW, cHWStrW); readingClauseW[cls] = MakeJavaString(env, lpHWStrW, cHWStrW);
} }
if (env->ExceptionCheck()) {
lpBndClauseW = NULL;
lpReadingClauseW = NULL;
delete [] bndClauseW;
delete [] readingClauseW;
return 0;
}
} }
else { else {
readingClauseW[cls] = NULL; readingClauseW[cls] = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册