mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8304541: Modules THROW_MSG_ should return nullptr instead of JNI_FALSE
Reviewed-by: coleenp
This commit is contained in:
parent
622f239448
commit
19f2edd9b7
1 changed files with 2 additions and 2 deletions
|
@ -761,7 +761,7 @@ jobject Modules::get_module(jclass clazz, TRAPS) {
|
||||||
|
|
||||||
if (clazz == nullptr) {
|
if (clazz == nullptr) {
|
||||||
THROW_MSG_(vmSymbols::java_lang_NullPointerException(),
|
THROW_MSG_(vmSymbols::java_lang_NullPointerException(),
|
||||||
"class is null", JNI_FALSE);
|
"class is null", nullptr);
|
||||||
}
|
}
|
||||||
oop mirror = JNIHandles::resolve_non_null(clazz);
|
oop mirror = JNIHandles::resolve_non_null(clazz);
|
||||||
if (mirror == nullptr) {
|
if (mirror == nullptr) {
|
||||||
|
@ -770,7 +770,7 @@ jobject Modules::get_module(jclass clazz, TRAPS) {
|
||||||
}
|
}
|
||||||
if (!java_lang_Class::is_instance(mirror)) {
|
if (!java_lang_Class::is_instance(mirror)) {
|
||||||
THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(),
|
THROW_MSG_(vmSymbols::java_lang_IllegalArgumentException(),
|
||||||
"Invalid class", JNI_FALSE);
|
"Invalid class", nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
oop module = java_lang_Class::module(mirror);
|
oop module = java_lang_Class::module(mirror);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue