8037909: JNI warnings in jdk/src/windows/native/java/nio/MappedByteBuffer.c
Summary: added CHECK_NULL after JNI GetFieldID native call
Reviewed-by: alanb, chegar
--- a/jdk/src/java.base/windows/native/libnio/MappedByteBuffer.c Mon Nov 10 11:23:23 2014 -0500
+++ b/jdk/src/java.base/windows/native/libnio/MappedByteBuffer.c Tue Nov 11 01:12:56 2014 +0000
@@ -83,9 +83,9 @@
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);