2004-09-21 Michael Koch <konqueror@gmx.de>
[gcc.git] / libjava / java / net / Socket.java
index 714a958e6aaaa27d418dcda2903f6603816ccf94..80caced4e33f50a4d3111530d7edd0c7c915d560 100644 (file)
@@ -311,8 +311,7 @@ public class Socket
     // that default.  JDK 1.2 doc infers not to do a bind.
   }
 
-  // This has to be accessible from java.net.ServerSocket.
-  SocketImpl getImpl() throws SocketException
+  private SocketImpl getImpl() throws SocketException
   {
     try
       {
@@ -480,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
    *
@@ -489,7 +489,7 @@ public class Socket
   public InetAddress getLocalAddress()
   {
     if (! isBound())
-      return null;
+      return InetAddress.ANY_IF;
 
     InetAddress addr = null;