From: Michael Koch Date: Tue, 21 Sep 2004 18:43:25 +0000 (+0000) Subject: 2004-09-21 Michael Koch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=938806922d7f2bc14ccfb8a87aed2af4de529236;p=gcc.git 2004-09-21 Michael Koch * java/net/Socket.java (getLocalAddress): Return InetAddress.ANY_IF if not bound yet. From-SVN: r87817 --- diff --git a/libjava/ChangeLog b/libjava/ChangeLog index a9e1aa921a0..6ad67cff350 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2004-09-21 Michael Koch + + * java/net/Socket.java + (getLocalAddress): Return InetAddress.ANY_IF if not bound yet. + 2004-09-21 Casey Marshall * javax/crypto/MacSpi.java (clone): Provide meaningful diff --git a/libjava/java/net/Socket.java b/libjava/java/net/Socket.java index 8855958cff0..80caced4e33 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 null is returned. + * is not connected, then a wildcard address, for which + * @see isAnyLocalAddress() is true, 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;