mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 18:14:38 +02:00
8195690: JNI GetObjectRefType doesn't handle NULL
Properly handle NULL, add some non-NULL preconditions. Reviewed-by: dholmes, mdoerr
This commit is contained in:
parent
490d2ce747
commit
2d847b1eb6
7 changed files with 26 additions and 6 deletions
|
@ -435,7 +435,7 @@ static void* check_wrapped_array_release(JavaThread* thr, const char* fn_name,
|
|||
}
|
||||
|
||||
oop jniCheck::validate_handle(JavaThread* thr, jobject obj) {
|
||||
if (JNIHandles::handle_type(thr, obj) != JNIInvalidRefType) {
|
||||
if ((obj != NULL) && (JNIHandles::handle_type(thr, obj) != JNIInvalidRefType)) {
|
||||
ASSERT_OOPS_ALLOWED;
|
||||
return JNIHandles::resolve_external_guard(obj);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue