From 2c5c30be84c98f1f1c69114a728ddc753e44da63 Mon Sep 17 00:00:00 2001 From: msheppar Date: Tue, 11 Nov 2014 01:12:56 +0000 Subject: [PATCH] 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 --- src/windows/native/java/nio/MappedByteBuffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/windows/native/java/nio/MappedByteBuffer.c b/src/windows/native/java/nio/MappedByteBuffer.c index 4880123a3..05f568001 100644 --- a/src/windows/native/java/nio/MappedByteBuffer.c +++ b/src/windows/native/java/nio/MappedByteBuffer.c @@ -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); -- GitLab