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:
committed by
Michael Koch
parent
31f0451e7e
commit
52b26143c9
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user