2005-04-26 Sven de Marothy <sven@physto.se>

* java/net/InetAddress.java
	(toString): Don't print empty hostnames.

From-SVN: r98793
This commit is contained in:
Sven de Marothy
2005-04-26 23:55:30 +02:00
committed by Michael Koch
parent 31f0451e7e
commit 52b26143c9
2 changed files with 6 additions and 1 deletions
+1 -1
View File
@@ -495,7 +495,7 @@ public class InetAddress implements Serializable
public String toString()
{
String addr = getHostAddress();
String host = (hostName != null) ? hostName : addr;
String host = (hostName != null) ? hostName : "";
return host + "/" + addr;
}