OSDN Git Service

2007-04-17 Andrew Haley <aph@redhat.com>
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Apr 2007 17:07:48 +0000 (17:07 +0000)
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 18 Apr 2007 17:07:48 +0000 (17:07 +0000)
* gnu/java/rmi/server/UnicastConnectionManager.java
(UnicastConnectionManager(int port, RMIServerSocketFactory)):
Listen on "localhost", not localhost.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@123952 138bc75d-0d04-0410-961f-82ee72b054a4

libjava/classpath/ChangeLog
libjava/classpath/gnu/java/rmi/server/UnicastConnectionManager.java

index 244b98d..fac684a 100644 (file)
@@ -1,3 +1,9 @@
+2007-04-17  Andrew Haley  <aph@redhat.com>
+
+       * gnu/java/rmi/server/UnicastConnectionManager.java
+       (UnicastConnectionManager(int port, RMIServerSocketFactory)):
+       Listen on "localhost", not localhost.
+
 2007-04-17  Francis Kung  <fkung@redhat.com>
 
        PR classpath/31311
index 9715d4a..a9992af 100644 (file)
@@ -181,7 +181,13 @@ private UnicastConnectionManager(int port, RMIServerSocketFactory ssf) throws Re
                serverPort = 0;
                throw new java.rmi.server.ExportException("can not create Server Socket on port " + port,ioex);
        }
-       serverName = localhost;
+       // Note that for compatibility the serverName is "localhost",
+       // not UnicastConnectionManager.localhost, which is the name
+       // of the local box.  A server listening on localhost:port is
+       // listening on the loopback interface, 127.0.0.1, but
+       // UnicastConnectionManager.localhost is an externally
+       // accessible IP address.
+       serverName = "localhost";
        serverFactory = ssf;
        clientFactory = null;
 }