提交 2c5c30be 编写于 作者: M msheppar

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
上级 b80e0660
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册