mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-23 20:07:58 +00:00
8028074: InetAddress.getByName fails with UHE "invalid IPv6 address" if host name starts with a-f
Reviewed-by: chegar
This commit is contained in:
parent
61b2527b10
commit
086dfc45ca
@ -1144,7 +1144,7 @@ class InetAddress implements java.io.Serializable {
|
||||
ifname = host.substring (pos+1);
|
||||
}
|
||||
}
|
||||
if ((addr = IPAddressUtil.textToNumericFormatV6(host)) == null) {
|
||||
if ((addr = IPAddressUtil.textToNumericFormatV6(host)) == null && host.contains(":")) {
|
||||
throw new UnknownHostException(host + ": invalid IPv6 address");
|
||||
}
|
||||
} else if (ipv6Expected) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user