private static void validateWeight(int weight) {
        checkArgument(weight >= 0, "weight: %s (expected: >= 0)", weight);
    }
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