commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <>
Subject Re: [commons ftp] help! FTPClient.isConnected() does not work.
Date Thu, 02 Nov 2006 23:28:56 GMT

In message <>, Anil Philip wr
>I am surprised that this bug hasnt been noticed before.

*sigh*  It's not a bug.  isConnected was only ever supposed to tell you if
you had previously called connect without an intervening disconnect, so you
would know if you had any cleanup to perform in the face of an exception.
That's it.  Only after JDK 1.4 came out (which added Socket.isConnected) did 
users who had no experience with the API under previous version of Java
start assuming the method tested the active socket connection.  Now that API
is abandoning legacy Java compatibility, it can be converted to a runtime
check.  The thing that is often lost on people is that we always provided a
way to insert your own behavior to take advantage of newer JDK features
(either via factories or inheritance) without compromising the baseline
JDK compatibility of the code base.  If there's a bug, it's that we didn't
explain these issues in sufficient detail in the documentation.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message