diff options
| author | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-03 14:40:59 +0000 |
|---|---|---|
| committer | mkoch <mkoch@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-05-03 14:40:59 +0000 |
| commit | 53404de6fb130cdb4458db1e44e41f3f71d37f6b (patch) | |
| tree | 984677eb48309d5e82ca7e882ec673e0203003e3 | |
| parent | e3dd855fbb074d5a10d9c80bd2b80edc27c29206 (diff) | |
| download | ppe42-gcc-53404de6fb130cdb4458db1e44e41f3f71d37f6b.tar.gz ppe42-gcc-53404de6fb130cdb4458db1e44e41f3f71d37f6b.zip | |
2004-05-03 Michael Koch <konqueror@gmx.de>
Fixes PR libgcj/14695:
* java/net/NetworkInterface.java
(getByName): Return null when no interface was found.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81434 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | libjava/ChangeLog | 6 | ||||
| -rw-r--r-- | libjava/java/net/NetworkInterface.java | 14 |
2 files changed, 15 insertions, 5 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index e2968ca346f..68af3d44ada 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -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> diff --git a/libjava/java/net/NetworkInterface.java b/libjava/java/net/NetworkInterface.java index e7f7290febc..ab6d7b4263f 100644 --- a/libjava/java/net/NetworkInterface.java +++ b/libjava/java/net/NetworkInterface.java @@ -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; } /** |

