arturobernalg commented on PR #598: URL: https://github.com/apache/httpcomponents-client/pull/598#issuecomment-2476700059
> @arturobernalg My idea was to add this method to `DnsResolver` > > ``` > /** > * Returns a list of {@link SocketAddress} for the given host with the given port. > * > * @see SocketAddress > * > * @since 5.5 > */ > default List<SocketAddress> resolve(String host, int port) throws UnknownHostException { > InetAddress[] inetAddresses = resolve(host); > if (inetAddresses == null) { > return Collections.singletonList(InetSocketAddress.createUnresolved(host, port)); > } > return Arrays.stream(inetAddresses) > .map(e -> new InetSocketAddress(e, port)) > .collect(Collectors.toList()); > } > ``` What about now, @ok2c ? I believe I've made the correct changes this time. Please review. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@hc.apache.org For additional commands, e-mail: dev-h...@hc.apache.org