2004-09-21 Michael Koch <konqueror@gmx.de>
[gcc.git] / libjava / java / net / Socket.java
index 8855958cff02978ea6dbf2835ea2bc4b8c08a25e..80caced4e33f50a4d3111530d7edd0c7c915d560 100644 (file)
@@ -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;