mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-14 09:53:18 +00:00
8373704: Improve "SocketException: Protocol family unavailable" message
Reviewed-by: lucy, jpai
This commit is contained in:
parent
6eaabed55c
commit
163038222a
@ -279,7 +279,7 @@ NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port,
|
||||
} else {
|
||||
jint address;
|
||||
if (family != java_net_InetAddress_IPv4) {
|
||||
JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Protocol family unavailable");
|
||||
JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "IPv6 protocol family unavailable");
|
||||
return -1;
|
||||
}
|
||||
address = getInetAddress_addr(env, iaObj);
|
||||
|
||||
@ -513,7 +513,7 @@ NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, int port,
|
||||
} else {
|
||||
jint address;
|
||||
if (family != java_net_InetAddress_IPv4) {
|
||||
JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "Protocol family unavailable");
|
||||
JNU_ThrowByName(env, JNU_JAVANETPKG "SocketException", "IPv6 protocol family unavailable");
|
||||
return -1;
|
||||
}
|
||||
address = getInetAddress_addr(env, iaObj);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user