mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-09 18:08:31 +00:00
8037909: JNI warnings in jdk/src/windows/native/java/nio/MappedByteBuffer.c
Added CHECK_NULL after JNI GetFieldID native call Reviewed-by: alanb, chegar
This commit is contained in:
parent
1c54a00f75
commit
e98e33a745
@ -83,9 +83,9 @@ Java_java_nio_MappedByteBuffer_force0(JNIEnv *env, jobject obj, jobject fdo,
|
||||
HANDLE h;
|
||||
if (handle_fdID == NULL) {
|
||||
jclass clazz = (*env)->FindClass(env, "java/io/FileDescriptor");
|
||||
if (clazz == NULL)
|
||||
return; // exception thrown
|
||||
CHECK_NULL(clazz); //exception thrown
|
||||
handle_fdID = (*env)->GetFieldID(env, clazz, "handle", "J");
|
||||
CHECK_NULL(handle_fdID);
|
||||
}
|
||||
h = jlong_to_ptr((*env)->GetLongField(env, fdo, handle_fdID));
|
||||
result = FlushFileBuffers(h);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user