presto-spi/src/main/java/io/prestosql/spi/HostAddress.java/HostAddress/getPort
class HostAddress:    public int getPort()
    {
        if (!hasPort()) {
            throw new IllegalStateException("no port");
        }
        return port;
    }