8373704: Improve "SocketException: Protocol family unavailable" message

Reviewed-by: lucy, jpai
This commit is contained in:
Matthias Baesken 2026-01-05 08:27:37 +00:00
parent 6eaabed55c
commit 163038222a
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);