/** * Returns the InetAddresses for {@code host}. The returned array is shared * and must be cloned before it is returned to application code. */ private static InetAddress[] getAllByNameImpl(String host) throws UnknownHostException { if (host == null || host.isEmpty()) { return loopbackAddresses(); } // Is it a numeric address? InetAddress result = parseNumericAddressNoThrow(host); if (result != null) { result = disallowDeprecatedFormats(host, result); if (result == null) { throw new UnknownHostException("Deprecated IPv4 address format: " + host); } return new InetAddress[] { result }; } return lookupHostByName(host).clone(); }
/** * Returns the InetAddresses for {@code host}. The returned array is shared * and must be cloned before it is returned to application code. */ private static InetAddress[] getAllByNameImpl(String host) throws UnknownHostException { if (host == null || host.isEmpty()) { return loopbackAddresses(); } // Is it a numeric address? InetAddress result = parseNumericAddressNoThrow(host); if (result != null) { result = disallowDeprecatedFormats(host, result); if (result == null) { throw new UnknownHostException("Deprecated IPv4 address format: " + host); } return new InetAddress[] { result }; } return lookupHostByName(host).clone(); }
/** * Returns the InetAddresses for {@code host}. The returned array is shared * and must be cloned before it is returned to application code. */ private static InetAddress[] getAllByNameImpl(String host) throws UnknownHostException { if (host == null || host.isEmpty()) { return loopbackAddresses(); } // Is it a numeric address? InetAddress result = parseNumericAddressNoThrow(host); if (result != null) { result = disallowDeprecatedFormats(host, result); if (result == null) { throw new UnknownHostException("Deprecated IPv4 address format: " + host); } return new InetAddress[] { result }; } return lookupHostByName(host).clone(); }
/** * Returns the InetAddresses for {@code host}. The returned array is shared * and must be cloned before it is returned to application code. */ private static InetAddress[] getAllByNameImpl(String host) throws UnknownHostException { if (host == null || host.isEmpty()) { return loopbackAddresses(); } // Is it a numeric address? InetAddress result = parseNumericAddressNoThrow(host); if (result != null) { result = disallowDeprecatedFormats(host, result); if (result == null) { throw new UnknownHostException("Deprecated IPv4 address format: " + host); } return new InetAddress[] { result }; } return lookupHostByName(host).clone(); }
/** * Returns the InetAddresses for {@code host}. The returned array is shared * and must be cloned before it is returned to application code. */ private static InetAddress[] getAllByNameImpl(String host) throws UnknownHostException { if (host == null || host.isEmpty()) { return loopbackAddresses(); } // Is it a numeric address? InetAddress result = parseNumericAddressNoThrow(host); if (result != null) { result = disallowDeprecatedFormats(host, result); if (result == null) { throw new UnknownHostException("Deprecated IPv4 address format: " + host); } return new InetAddress[] { result }; } return lookupHostByName(host).clone(); }
/** * Returns the InetAddresses for {@code host}. The returned array is shared * and must be cloned before it is returned to application code. */ private static InetAddress[] getAllByNameImpl(String host) throws UnknownHostException { if (host == null || host.isEmpty()) { return loopbackAddresses(); } // Is it a numeric address? InetAddress result = parseNumericAddressNoThrow(host); if (result != null) { result = disallowDeprecatedFormats(host, result); if (result == null) { throw new UnknownHostException("Deprecated IPv4 address format: " + host); } return new InetAddress[] { result }; } return lookupHostByName(host).clone(); }
/** * Returns the InetAddresses for {@code host}. The returned array is shared * and must be cloned before it is returned to application code. */ private static InetAddress[] getAllByNameImpl(String host) throws UnknownHostException { if (host == null || host.isEmpty()) { return loopbackAddresses(); } // Is it a numeric address? InetAddress result = parseNumericAddressNoThrow(host); if (result != null) { result = disallowDeprecatedFormats(host, result); if (result == null) { throw new UnknownHostException("Deprecated IPv4 address format: " + host); } return new InetAddress[] { result }; } return lookupHostByName(host).clone(); }