Socket.connect is specified to throw an IllegalArgumentException if the
argument is a SocketAddress subtype not supported by the socket but the
implementation throws SocketException.
The same issue arises with ServerSocket.bind and probably other methods.