changeset 12686:9a1abc6aada3

8080486: JNI exception pending in jdk/src/java.base/windows/native/libnet/DualStackPlainSocketImpl.c Reviewed-by: alanb, chegar, igerasim Contributed-by: vyom.tewari@oracle.com
author dfuchs
date Mon, 07 Sep 2015 10:37:00 +0200
parents 4226ee94c70d
children d06ae7ff8afd
files src/java.base/share/native/libnet/InetAddress.c src/java.base/windows/native/libnet/DualStackPlainSocketImpl.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/native/libnet/InetAddress.c	Fri Sep 04 14:16:34 2015 -0700
+++ b/src/java.base/share/native/libnet/InetAddress.c	Mon Sep 07 10:37:00 2015 +0200
@@ -57,6 +57,7 @@
         c = (*env)->FindClass(env,"java/net/InetAddress$InetAddressHolder");
         CHECK_NULL(c);
         iac_class = (*env)->NewGlobalRef(env, c);
+        CHECK_NULL(iac_class);
         ia_holderID = (*env)->GetFieldID(env, ia_class, "holder", "Ljava/net/InetAddress$InetAddressHolder;");
         CHECK_NULL(ia_holderID);
         ia_preferIPv6AddressID = (*env)->GetStaticFieldID(env, ia_class, "preferIPv6Address", "Z");
--- a/src/java.base/windows/native/libnet/DualStackPlainSocketImpl.c	Fri Sep 04 14:16:34 2015 -0700
+++ b/src/java.base/windows/native/libnet/DualStackPlainSocketImpl.c	Mon Sep 07 10:37:00 2015 +0200
@@ -45,9 +45,10 @@
     jclass cls = (*env)->FindClass(env, "java/net/InetSocketAddress");
     CHECK_NULL(cls);
     isa_class = (*env)->NewGlobalRef(env, cls);
+    CHECK_NULL(isa_class);
     isa_ctorID = (*env)->GetMethodID(env, cls, "<init>",
                                      "(Ljava/net/InetAddress;I)V");
-
+    CHECK_NULL(isa_ctorID);
     initInetAddressIDs(env);
 
     // implement read timeout with select.