changeset 10941:ad04eada78e9

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
author msheppar
date Tue, 11 Nov 2014 01:12:56 +0000
parents 23e10e5df0b3
children eec41441a8e0
files src/java.base/windows/native/libnio/MappedByteBuffer.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/windows/native/libnio/MappedByteBuffer.c	Mon Nov 10 11:23:23 2014 -0500
+++ b/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);