8341789: Fix ExceptionOccurred in java.base

Reviewed-by: bpb, jpai, dfuchs, lancea, rriggs, naoto
This commit is contained in:
Justin Lu 2024-10-10 17:33:22 +00:00
parent 76541b0646
commit 7eb55357ab
10 changed files with 34 additions and 34 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2024, 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
@ -114,7 +114,7 @@ Java_java_lang_ClassLoader_defineClass1(JNIEnv *env,
(*env)->GetByteArrayRegion(env, data, offset, length, body);
if ((*env)->ExceptionOccurred(env)) {
if ((*env)->ExceptionCheck(env)) {
goto free_body;
}
@ -259,7 +259,7 @@ Java_java_lang_ClassLoader_defineClass0(JNIEnv *env,
(*env)->GetByteArrayRegion(env, data, offset, length, body);
if ((*env)->ExceptionOccurred(env))
if ((*env)->ExceptionCheck(env))
goto free_body;
if (name != NULL) {