RFR: JDK-8037909 - JNI warnings in jdk/src/windows/native/java/nio/MappedByteBuffer.c

Alan Bateman Alan.Bateman at oracle.com
Mon Nov 10 17:59:32 UTC 2014


On 10/11/2014 17:37, Mark Sheppard wrote:
> Hi
> please oblige and review the follow change
>
> diff -r c0d1026bff6f 
> src/java.base/windows/native/libnio/MappedByteBuffer.c
> --- a/src/java.base/windows/native/libnio/MappedByteBuffer.c Tue Nov 
> 04 15:10:38 2014 +0000
> +++ b/src/java.base/windows/native/libnio/MappedByteBuffer.c Mon Nov 
> 10 17:32:51 2014 +0000
> @@ -86,6 +86,7 @@
>              if (clazz == NULL)
>                  return; // 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);
>
This looks okay to me. For consistency then the FindClass just before it 
could use CHECK_NULL too.

-Alan



More information about the core-libs-dev mailing list