re PR libgcj/14695 ([3.3/3.4 only] java.net.NetworkInterface.getByName() throws exception instead of returning null)
2004-05-03 Michael Koch <konqueror@gmx.de> Fixes PR libgcj/14695: * java/net/NetworkInterface.java (getByName): Return null when no interface was found. From-SVN: r81434
This commit is contained in:
parent
6adcf89d9a
commit
493b3c9c47
@ -1,3 +1,9 @@
|
||||
2004-05-03 Michael Koch <konqueror@gmx.de>
|
||||
|
||||
Fixes PR libgcj/14695:
|
||||
* java/net/NetworkInterface.java
|
||||
(getByName): Return null when no interface was found.
|
||||
|
||||
2004-04-30 Ranjit Mathew <rmathew@hotmail.com>
|
||||
Tom Tromey <tromey@redhat.com>
|
||||
|
||||
|
@ -130,12 +130,15 @@ public final class NetworkInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* 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 <code>NetworkInterface</code> 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 @@ public final class NetworkInterface
|
||||
return tmp;
|
||||
}
|
||||
|
||||
throw new SocketException("no network interface with this name exists");
|
||||
// No interface with the given name found.
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user