presto-spi/src/main/java/io/prestosql/spi/HostAddress.java/HostAddress/withDefaultPort
class HostAddress:    public HostAddress withDefaultPort(int defaultPort)
    {
        if (!isValidPort(defaultPort)) {
            throw new IllegalArgumentException("Port number out of range: " + defaultPort);
        }

        if (hasPort() || port == defaultPort) {
            return this;
        }
        return new HostAddress(host, defaultPort);
    }