summaryrefslogtreecommitdiff
path: root/java/net/Socket.java
diff options
context:
space:
mode:
authorAndrew John Hughes <gnu_andrew@member.fsf.org>2005-01-16 02:14:44 +0000
committerAndrew John Hughes <gnu_andrew@member.fsf.org>2005-01-16 02:14:44 +0000
commit2522f3363d0ccbb714b010c6ce79eb698052cca3 (patch)
treef9753bfb14e4195fe8c928b76e7d5407375bddf2 /java/net/Socket.java
parent18addaa71c45fbdb60627f349e52027b3281e879 (diff)
downloadclasspath-2522f3363d0ccbb714b010c6ce79eb698052cca3.tar.gz
2005-01-16 Andrew John Hughes <gnu_andrew@member.fsf.org>
* Merge of November 2004 HEAD patches to generics branch
Diffstat (limited to 'java/net/Socket.java')
-rw-r--r--java/net/Socket.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/net/Socket.java b/java/net/Socket.java
index bebd73d54..5d3223769 100644
--- a/java/net/Socket.java
+++ b/java/net/Socket.java
@@ -520,14 +520,14 @@ public class Socket
/**
* Returns the port number of the remote end of the socket connection. If
- * this socket is not connected, then -1 is returned.
+ * this socket is not connected, then 0 is returned.
*
* @return The remote port this socket is connected to
*/
public int getPort()
{
if (! isConnected())
- return -1;
+ return 0;
try
{
@@ -538,7 +538,7 @@ public class Socket
// This cannot happen as we are connected.
}
- return -1;
+ return 0;
}
/**