private static void validatePort(String name, int port) {
        checkArgument(port > 0 && port <= 65535, "%s: %s (expected: 1-65535)", name, port);
    }
Converts this endpoint into an {@link InetSocketAddress}. The specified {@code defaultPort} is used
if this endpoint does not have a port number. A {@link DomainSocketAddress} is returned if this
endpoint refers to a Unix domain socket.

@see #hasPort()
@see #isDomainSocket()
core/src/main/java/com/linecorp/armeria/client/Endpoint.java