8037909: JNI warnings in jdk/src/windows/native/java/nio/MappedByteBuffer.c
authormsheppar
Tue, 11 Nov 2014 01:12:56 +0000
changeset 27492 06211f6ecc72
parent 27491 1c0081281564
child 27497 a973ee8d8560
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
jdk/src/java.base/windows/native/libnio/MappedByteBuffer.c
--- 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);