8033689: PlainDatagramSocketImpl missing returns after throwing an exception

Reviewed-by: michaelm
This commit is contained in:
Chris Hegarty 2014-02-05 14:14:46 +00:00
parent 329369ddf6
commit 319dd343be

View File

@ -506,6 +506,7 @@ Java_java_net_PlainDatagramSocketImpl_peek(JNIEnv *env, jobject this,
}
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 @@ Java_java_net_PlainDatagramSocketImpl_socketSetOption(JNIEnv *env,
default :
JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException",
"Socket option not supported by PlainDatagramSocketImp");
break;
return;
}
@ -1833,6 +1834,7 @@ Java_java_net_PlainDatagramSocketImpl_setTimeToLive(JNIEnv *env, jobject this,
#ifdef AF_INET6
#ifdef __linux__
setTTL(env, fd, ttl);
JNU_CHECK_EXCEPTION(env);
if (ipv6_available()) {
setHopLimit(env, fd, ttl);
}
@ -2120,6 +2122,7 @@ static void mcast_join_leave(JNIEnv *env, jobject this,
else
NET_ThrowCurrent(env, "setsockopt IP_DROP_MEMBERSHIP failed");
}
return;
}
}