8033689: PlainDatagramSocketImpl missing returns after throwing an exception
Reviewed-by: michaelm
--- a/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c Wed Feb 05 14:21:10 2014 +0100
+++ b/jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c Wed Feb 05 14:14:46 2014 +0000
@@ -506,6 +506,7 @@
}
if (IS_NULL(addressObj)) {
JNU_ThrowNullPointerException(env, "Null address in peek()");
+ return -1;
}
if (timeout) {
int ret = NET_Timeout(fd, timeout);
@@ -1419,7 +1420,7 @@
default :
JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
"Socket option not supported by PlainDatagramSocketImp");
- break;
+ return;
}
@@ -1833,6 +1834,7 @@
#ifdef AF_INET6
#ifdef __linux__
setTTL(env, fd, ttl);
+ JNU_CHECK_EXCEPTION(env);
if (ipv6_available()) {
setHopLimit(env, fd, ttl);
}
@@ -2120,6 +2122,7 @@
else
NET_ThrowCurrent(env, "setsockopt IP_DROP_MEMBERSHIP failed");
}
+ return;
}
}