public HostAndPort withDefaultPort()

in phoenix-queryserver/src/main/java/org/apache/phoenix/util/HostAndPort.java [214:222]


  public HostAndPort withDefaultPort(int defaultPort) {
    if (!isValidPort(defaultPort)) {
      throw new IllegalArgumentException();
    }
    if (hasPort() || port == defaultPort) {
      return this;
    }
    return new HostAndPort(host, defaultPort, hasBracketlessColons);
  }