code: public static SocketAddress resolve(InetSocketAddress inetSocketAddress, DnsResolver dnsResolver) {
  
          try {
              InetAddress inetAddress = dnsResolver.resolve(inetSocketAddress.getHostString())[0];
              return new InetSocketAddress(inetAddress, inetSocketAddress.getPort());
          } catch (UnknownHostException e) {
              return new InetSocketAddress(inetSocketAddress.getHostString(), inetSocketAddress.getPort());
          }
  
      }
docs: Resolves a {@link ConnectionPoint} to a {@link java.net.SocketAddress}.
  
  @param inetSocketAddress must not be {@literal null}
  @param dnsResolver must not be {@literal null}
  @return the resolved {@link SocketAddress}