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

View File

@ -1,3 +1,8 @@
2005-04-26 Sven de Marothy <sven@physto.se>
* java/net/InetAddress.java
(toString): Don't print empty hostnames.
2005-04-26 Luca Barbieri <luca.barbieri@gmail.com>
PR libgcj/21136:

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;
}