2004-09-21 Michael Koch <konqueror@gmx.de>

* java/net/Socket.java
	(getLocalAddress): Return InetAddress.ANY_IF if not bound yet.

From-SVN: r87817
This commit is contained in:
Michael Koch 2004-09-21 18:43:25 +00:00 committed by Andreas Tobler
parent 448a698b4e
commit 938806922d
2 changed files with 8 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2004-09-21 Michael Koch <konqueror@gmx.de>
* java/net/Socket.java
(getLocalAddress): Return InetAddress.ANY_IF if not bound yet.
2004-09-21 Casey Marshall <csm@gnu.org> 2004-09-21 Casey Marshall <csm@gnu.org>
* javax/crypto/MacSpi.java (clone): Provide meaningful * javax/crypto/MacSpi.java (clone): Provide meaningful

View file

@ -479,7 +479,8 @@ public class Socket
/** /**
* Returns the local address to which this socket is bound. If this 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 * @return The local address
* *
@ -488,7 +489,7 @@ public class Socket
public InetAddress getLocalAddress() public InetAddress getLocalAddress()
{ {
if (! isBound()) if (! isBound())
return null; return InetAddress.ANY_IF;
InetAddress addr = null; InetAddress addr = null;