2004-11-06 Noa Resare <noa@resare.com>
* java/net/Socket.java (getPort): Return 0 instead of -1 on
unconnected sockets.
From-SVN: r90178
+2004-11-06 Noa Resare <noa@resare.com>
+
+ * java/net/Socket.java (getPort): Return 0 instead of -1 on
+ unconnected sockets.
+
2004-11-06 Michael Koch <konqueror@gmx.de>
* java/lang/StringBuffer.java,
/**
* 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
{