changeset 12671:fd1f5c32751e

8064470: JNI exception pending in jdk/src/java/base/unix/native/libjava/FileDescriptor_md.c Reviewed-by: alanb, chegar, dfuchs Contributed-by: vyom.tewari@oracle.com
author dfuchs
date Tue, 01 Sep 2015 15:34:58 +0200
parents 4f3c5f831833
children 7a555c3509d2
files src/java.base/unix/native/libjava/FileDescriptor_md.c
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/unix/native/libjava/FileDescriptor_md.c	Mon Aug 31 11:26:11 2015 -0700
+++ b/src/java.base/unix/native/libjava/FileDescriptor_md.c	Tue Sep 01 15:34:58 2015 +0200
@@ -26,9 +26,11 @@
 #include <unistd.h>
 #include <fcntl.h>
 
+#include "jni.h"
+#include "jni_util.h"
 #include "jvm.h"
+
 #include "io_util_md.h"
-
 #include "java_io_FileDescriptor.h"
 
 /*******************************************************************/
@@ -47,8 +49,8 @@
 
 JNIEXPORT void JNICALL
 Java_java_io_FileDescriptor_initIDs(JNIEnv *env, jclass fdClass) {
-    IO_fd_fdID = (*env)->GetFieldID(env, fdClass, "fd", "I");
-    IO_append_fdID = (*env)->GetFieldID(env, fdClass, "append", "Z");
+    CHECK_NULL(IO_fd_fdID = (*env)->GetFieldID(env, fdClass, "fd", "I"));
+    CHECK_NULL(IO_append_fdID = (*env)->GetFieldID(env, fdClass, "append", "Z"));
 }
 
 /**************************************************************