src/java.base/share/native/libjava/jni_util.h
changeset 51151 d6b131d2bc8b
parent 49557 7b00ac6c11ab
child 56873 af61810ccd5b
child 57868 7ae075afc72f
child 58678 9cf78a70fa4f
--- a/src/java.base/share/native/libjava/jni_util.h	Wed Jul 18 14:44:04 2018 -0700
+++ b/src/java.base/share/native/libjava/jni_util.h	Thu Jan 18 13:55:26 2018 +0530
@@ -297,6 +297,22 @@
         }                                       \
     } while (0)                                 \
 
+#define CHECK_NULL_THROW_NPE(env, x, msg)         \
+    do {                                        \
+        if ((x) == NULL) {                      \
+           JNU_ThrowNullPointerException((env), (msg));\
+           return;                              \
+        }                                       \
+    } while(0)                                  \
+
+#define CHECK_NULL_THROW_NPE_RETURN(env, x, msg, z)\
+    do {                                        \
+        if ((x) == NULL) {                      \
+           JNU_ThrowNullPointerException((env), (msg));\
+           return (z);                          \
+        }                                       \
+    } while(0)                                  \
+
 #define CHECK_NULL_RETURN(x, y)                 \
     do {                                        \
         if ((x) == NULL) {                      \