Hi list,
I commited the attached patch from Sven de Morathy to fix on bug in
InetAddress.troString().
Michael
2005-02-25 Sven de Marothy <[EMAIL PROTECTED]>
* java/net/InetAddress.java
(toString): Don't print empty hostnames.
Fixes bug #11956
Index: java/net/InetAddress.java
===================================================================
RCS file: /cvsroot/classpath/classpath/java/net/InetAddress.java,v
retrieving revision 1.37
diff -u -r1.37 InetAddress.java
--- java/net/InetAddress.java 3 Jan 2005 11:13:44 -0000 1.37
+++ java/net/InetAddress.java 25 Feb 2005 09:49:23 -0000
@@ -1,5 +1,5 @@
/* InetAddress.java -- Class to model an Internet address
- Copyright (C) 1998, 1999, 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -523,7 +523,7 @@
public String toString()
{
String addr = getHostAddress();
- String host = (hostName != null) ? hostName : addr;
+ String host = (hostName != null) ? hostName : "";
return host + "/" + addr;
}
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches