code: private void throwPreferedIPv4StackIPv6AddressError(String location, List<TcpResourceAddress> tcpAddresses) {
          try {
              InetAddress address = InetAddress.getByName(URIUtils.getHost(location));
              boolean preferIPv4Stack = Boolean.parseBoolean(System.getProperty(JAVA_NET_PREFER_IPV4_STACK));
              if (preferIPv4Stack && (address instanceof Inet6Address)) {
                  throw new IllegalArgumentException(format(PREFER_IPV4_STACK_IPV6_ADDRESS_EXCEPTION_FORMATTER, location));
              }
          } catch (UnknownHostException e) {
              // InetAddress.getByName(hostAddress) throws an exception (hostAddress may have an
              // unsupported format, e.g. network interface syntax)
          }
      }
docs: Throw error on specific circumstances:
  - no addresses available for binding
  - when PreferedIPv4 flag is true and the host IP is IPV6
  @param location
  @param tcpAddresses