@Test public void validateHostPortList_ok_ipv4() { List<InetSocketAddress> validServers = InetSocketAddressConverter.getInetSocketAddresses( new String[]{ "10.12.14.43:9610", "10.12.14.43", "127.0.0.1:9510", "127.0.0.1" }); InetSocketAddress server1 = InetSocketAddress.createUnresolved("10.12.14.43", 9610); InetSocketAddress server2 = InetSocketAddress.createUnresolved("10.12.14.43", 0); InetSocketAddress server3 = InetSocketAddress.createUnresolved("127.0.0.1", 9510); InetSocketAddress server4 = InetSocketAddress.createUnresolved("127.0.0.1", 0); assertThat(validServers, hasItems(server1, server2, server3, server4)); }
public static List<InetSocketAddress> getInetSocketAddresses(String[] servers) { return getInetSocketAddresses(servers, 0); }
InetSocketAddressConverter { public static List<InetSocketAddress> getInetSocketAddresses(String[] servers) { return getInetSocketAddresses(servers, 0); } }
InetSocketAddressConverter { public static List<InetSocketAddress> getInetSocketAddresses(String[] servers) { return getInetSocketAddresses(servers, 0); }  }
InetSocketAddressConverter { public static List<InetSocketAddress> getInetSocketAddresses(String[] servers) { return getInetSocketAddresses(servers, 0); }  static InetSocketAddress getInetSocketAddress(String server); static InetSocketAddress getInetSocketAddress(String hostPort, int defaultPort); static List<InetSocketAddress> getInetSocketAddresses(String[] servers); static List<InetSocketAddress> getInetSocketAddresses(String[] servers, int defaultPort); static String toHostPort(InetSocketAddress address); }
InetSocketAddressConverter { public static List<InetSocketAddress> getInetSocketAddresses(String[] servers) { return getInetSocketAddresses(servers, 0); }  static InetSocketAddress getInetSocketAddress(String server); static InetSocketAddress getInetSocketAddress(String hostPort, int defaultPort); static List<InetSocketAddress> getInetSocketAddresses(String[] servers); static List<InetSocketAddress> getInetSocketAddresses(String[] servers, int defaultPort); static String toHostPort(InetSocketAddress address);  }