2005-04-26 Sven de Marothy <sven@physto.se>
authorSven de Marothy <sven@physto.se>
Tue, 26 Apr 2005 21:55:30 +0000 (23:55 +0200)
committerMichael Koch <mkoch@gcc.gnu.org>
Tue, 26 Apr 2005 21:55:30 +0000 (21:55 +0000)
* java/net/InetAddress.java
(toString): Don't print empty hostnames.

From-SVN: r98793

libjava/ChangeLog
libjava/java/net/InetAddress.java

index fcd667f114bd9d1fa64328af9c2b52d102973313..bf0a93aa2f88caa492a3562628b384c66f357f7d 100644 (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:
index 9de34c1266c5947e53b737dd4fa33e392d676d35..cfb7a5fb0d3df8003d97cb44c9994d6f1e98e850 100644 (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;
   }