[Patch] java.net.InetAddress

Michael Koch konqueror@gmx.de
Tue Nov 16 16:14:00 GMT 2004


Hi list,


I just commited the attached patch to merge
java.net.InetAddress.toString() with GNU classpath.


Michael


2004-11-16  Michael Koch  <konqueror@gmx.de>

	* java/net/InetAddress.java
	(toString): Merged from GNU classpath.

-------------- next part --------------
Index: java/net/InetAddress.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/InetAddress.java,v
retrieving revision 1.32
diff -u -r1.32 InetAddress.java
--- java/net/InetAddress.java	18 Oct 2004 12:36:27 -0000	1.32
+++ java/net/InetAddress.java	16 Nov 2004 15:33:14 -0000
@@ -488,9 +488,9 @@
    */
   public String toString()
   {
-    String address = getHostAddress();
-    String host = (hostName != null) ? hostName : address;
-    return host + "/" + address;
+    String addr = getHostAddress();
+    String host = (hostName != null) ? hostName : addr;
+    return host + "/" + addr;
   }
 
   /**


More information about the Java-patches mailing list