8081388: JNI exception pending in jdk/src/windows/bin/java_md.c
Reviewed-by: ksrini
This commit is contained in:
parent
f2099ceae0
commit
4a0362efff
@ -1497,6 +1497,7 @@ NewPlatformStringArray(JNIEnv *env, char **strv, int strc)
|
||||
|
||||
NULL_CHECK0(cls = FindBootStrapClass(env, "java/lang/String"));
|
||||
NULL_CHECK0(ary = (*env)->NewObjectArray(env, strc, cls, 0));
|
||||
CHECK_EXCEPTION_RETURN_VALUE(0);
|
||||
for (i = 0; i < strc; i++) {
|
||||
jstring str = NewPlatformString(env, *strv++);
|
||||
NULL_CHECK0(str);
|
||||
|
@ -253,6 +253,13 @@ typedef struct {
|
||||
#define NULL_CHECK(NC_check_pointer) \
|
||||
NULL_CHECK_RETURN_VALUE(NC_check_pointer, )
|
||||
|
||||
#define CHECK_EXCEPTION_RETURN_VALUE(CER_value) \
|
||||
do { \
|
||||
if ((*env)->ExceptionOccurred(env)) { \
|
||||
return CER_value; \
|
||||
} \
|
||||
} while (JNI_FALSE)
|
||||
|
||||
#define CHECK_EXCEPTION_RETURN() \
|
||||
do { \
|
||||
if ((*env)->ExceptionOccurred(env)) { \
|
||||
|
Loading…
x
Reference in New Issue
Block a user