Index: java/net/NetworkInterface.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/net/NetworkInterface.java,v retrieving revision 1.7 diff -u -r1.7 NetworkInterface.java --- java/net/NetworkInterface.java 8 Apr 2004 16:26:04 -0000 1.7 +++ java/net/NetworkInterface.java 5 May 2004 06:34:31 -0000 @@ -130,12 +130,15 @@ } /** - * Returns an network interface by name + * Returns an network interface by name * - * @param name The name of the interface to return + * @param name The name of the interface to return + * + * @return a NetworkInterface object representing the interface, + * or null if there is no interface with that name. * - * @exception SocketException If an error occurs - * @exception NullPointerException If the specified name is null + * @exception SocketException If an error occurs + * @exception NullPointerException If the specified name is null */ public static NetworkInterface getByName(String name) throws SocketException @@ -150,7 +153,8 @@ return tmp; } - throw new SocketException("no network interface with this name exists"); + // No interface with the given name found. + return null; } /**