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:
parent
31f0451e7e
commit
52b26143c9
2 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue