@Test public void toResolvedInetSocketAddressFromUnresolved() { Throwable t = assertThrows(IllegalArgumentException.class, () -> toResolvedInetSocketAddress(HostAndPort.of("unresolved-hostname", 8080))); assertThat(t.getCause(), instanceOf(UnknownHostException.class)); }
public static InetSocketAddress toResolvedInetSocketAddress(final HostAndPort resolvedAddress) { try { return new InetSocketAddress(getByAddress(createByteArrayFromIpAddressString( resolvedAddress.hostName())), resolvedAddress.port()); } catch (UnknownHostException e) { throw new IllegalArgumentException("Invalid resolved address: " + resolvedAddress.hostName() + ", expected IP-address.", e); } }
BuilderUtils { public static InetSocketAddress toResolvedInetSocketAddress(final HostAndPort resolvedAddress) { try { return new InetSocketAddress(getByAddress(createByteArrayFromIpAddressString( resolvedAddress.hostName())), resolvedAddress.port()); } catch (UnknownHostException e) { throw new IllegalArgumentException("Invalid resolved address: " + resolvedAddress.hostName() + ", expected IP-address.", e); } } }
BuilderUtils { public static InetSocketAddress toResolvedInetSocketAddress(final HostAndPort resolvedAddress) { try { return new InetSocketAddress(getByAddress(createByteArrayFromIpAddressString( resolvedAddress.hostName())), resolvedAddress.port()); } catch (UnknownHostException e) { throw new IllegalArgumentException("Invalid resolved address: " + resolvedAddress.hostName() + ", expected IP-address.", e); } } private  BuilderUtils(); }
BuilderUtils { public static InetSocketAddress toResolvedInetSocketAddress(final HostAndPort resolvedAddress) { try { return new InetSocketAddress(getByAddress(createByteArrayFromIpAddressString( resolvedAddress.hostName())), resolvedAddress.port()); } catch (UnknownHostException e) { throw new IllegalArgumentException("Invalid resolved address: " + resolvedAddress.hostName() + ", expected IP-address.", e); } } private  BuilderUtils(); static boolean useEpoll(EventLoopGroup group); static boolean useKQueue(EventLoopGroup group); static Class<? extends ServerChannel> serverChannel(EventLoopGroup group,
                                                               Class<? extends SocketAddress> addressClass); static Class<? extends Channel> socketChannel(EventLoopGroup group,
                                                         Class<? extends SocketAddress> addressClass); @Nullable static Channel socketChannel(EventLoopGroup group, FileDescriptorSocketAddress address); static SocketAddress toNettyAddress(Object address); static InetSocketAddress toResolvedInetSocketAddress(final HostAndPort resolvedAddress); static Class<? extends DatagramChannel> datagramChannel(EventLoopGroup group); static String formatCanonicalAddress(SocketAddress address); static void closeAndRethrowUnchecked(@Nullable Closeable closable); }
BuilderUtils { public static InetSocketAddress toResolvedInetSocketAddress(final HostAndPort resolvedAddress) { try { return new InetSocketAddress(getByAddress(createByteArrayFromIpAddressString( resolvedAddress.hostName())), resolvedAddress.port()); } catch (UnknownHostException e) { throw new IllegalArgumentException("Invalid resolved address: " + resolvedAddress.hostName() + ", expected IP-address.", e); } } private  BuilderUtils(); static boolean useEpoll(EventLoopGroup group); static boolean useKQueue(EventLoopGroup group); static Class<? extends ServerChannel> serverChannel(EventLoopGroup group,
                                                               Class<? extends SocketAddress> addressClass); static Class<? extends Channel> socketChannel(EventLoopGroup group,
                                                         Class<? extends SocketAddress> addressClass); @Nullable static Channel socketChannel(EventLoopGroup group, FileDescriptorSocketAddress address); static SocketAddress toNettyAddress(Object address); static InetSocketAddress toResolvedInetSocketAddress(final HostAndPort resolvedAddress); static Class<? extends DatagramChannel> datagramChannel(EventLoopGroup group); static String formatCanonicalAddress(SocketAddress address); static void closeAndRethrowUnchecked(@Nullable Closeable closable);  }