aboutsummaryrefslogtreecommitdiff
path: root/libjava/java
diff options
context:
space:
mode:
authorStephen Crawley <crawley@dstc.edu.au>2003-08-01 21:08:33 +0000
committerMichael Koch <mkoch@gcc.gnu.org>2003-08-01 21:08:33 +0000
commit6e42faef6d3889aeb4b4072f4719755d9e262fdf (patch)
tree8f8453dc1d12ebe41ddf0495d33e159e90db2b3e /libjava/java
parent1ce4e666b28071b79a365d28dcc853e7ff1d1377 (diff)
downloadgcc-6e42faef6d3889aeb4b4072f4719755d9e262fdf.zip
gcc-6e42faef6d3889aeb4b4072f4719755d9e262fdf.tar.gz
gcc-6e42faef6d3889aeb4b4072f4719755d9e262fdf.tar.bz2
SocketImpl.java (toString): Display the remote address of an unconnected server socket as "0.0.0.0/0.0.0.0".
2003-08-01 Stephen Crawley <crawley@dstc.edu.au> * java/net/SocketImpl.java (toString): Display the remote address of an unconnected server socket as "0.0.0.0/0.0.0.0". From-SVN: r70069
Diffstat (limited to 'libjava/java')
-rw-r--r--libjava/java/net/SocketImpl.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/libjava/java/net/SocketImpl.java b/libjava/java/net/SocketImpl.java
index 1410151..e43b49e 100644
--- a/libjava/java/net/SocketImpl.java
+++ b/libjava/java/net/SocketImpl.java
@@ -276,7 +276,8 @@ public abstract class SocketImpl implements SocketOptions
*/
public String toString()
{
- return "[addr=" + address
+ return "[addr=" + ((address == null) ? "0.0.0.0/0.0.0.0" :
+ address.toString())
+ ",port=" + port
+ ",localport=" + localport + "]";
}