diff options
author | Michael Koch <konqueror@gmx.de> | 2004-09-21 18:43:25 +0000 |
---|---|---|
committer | Andreas Tobler <andreast@gcc.gnu.org> | 2004-09-21 20:43:25 +0200 |
commit | 938806922d7f2bc14ccfb8a87aed2af4de529236 (patch) | |
tree | a43206a8a245c3aacedf95710c0bd3225cd8ede4 /libjava/java | |
parent | 448a698b4e17ebc846fa4997b38996fdb2058c3d (diff) | |
download | gcc-938806922d7f2bc14ccfb8a87aed2af4de529236.zip gcc-938806922d7f2bc14ccfb8a87aed2af4de529236.tar.gz gcc-938806922d7f2bc14ccfb8a87aed2af4de529236.tar.bz2 |
2004-09-21 Michael Koch <konqueror@gmx.de>
* java/net/Socket.java
(getLocalAddress): Return InetAddress.ANY_IF if not bound yet.
From-SVN: r87817
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/net/Socket.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libjava/java/net/Socket.java b/libjava/java/net/Socket.java index 8855958..80caced 100644 --- a/libjava/java/net/Socket.java +++ b/libjava/java/net/Socket.java @@ -479,7 +479,8 @@ public class Socket /** * Returns the local address to which this socket is bound. If this socket - * is not connected, then <code>null</code> is returned. + * is not connected, then a wildcard address, for which + * @see isAnyLocalAddress() is <code>true</code>, is returned. * * @return The local address * @@ -488,7 +489,7 @@ public class Socket public InetAddress getLocalAddress() { if (! isBound()) - return null; + return InetAddress.ANY_IF; InetAddress addr = null; |