aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/net
diff options
context:
space:
mode:
authorSven de Marothy <sven@physto.se>2005-04-26 23:55:30 +0200
committerMichael Koch <mkoch@gcc.gnu.org>2005-04-26 21:55:30 +0000
commit52b26143c9fc9a8dd3df7969e4a5e3ca55da6ec9 (patch)
treef40e32d9a0b270135d0dc4be17ab9d5bd0b16dfd /libjava/java/net
parent31f0451e7eeba3e6d900d93fb058cb9094390693 (diff)
downloadgcc-52b26143c9fc9a8dd3df7969e4a5e3ca55da6ec9.zip
gcc-52b26143c9fc9a8dd3df7969e4a5e3ca55da6ec9.tar.gz
gcc-52b26143c9fc9a8dd3df7969e4a5e3ca55da6ec9.tar.bz2
2005-04-26 Sven de Marothy <sven@physto.se>
* java/net/InetAddress.java (toString): Don't print empty hostnames. From-SVN: r98793
Diffstat (limited to 'libjava/java/net')
-rw-r--r--libjava/java/net/InetAddress.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/libjava/java/net/InetAddress.java b/libjava/java/net/InetAddress.java
index 9de34c1..cfb7a5f 100644
--- a/libjava/java/net/InetAddress.java
+++ b/libjava/java/net/InetAddress.java
@@ -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;
}