commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel F. Savarese" <...@savarese.org>
Subject Re: [NET] [PATCH] FTPClient to work with FTP servers using a Japanese locale. [UPDATE]
Date Thu, 19 Aug 2004 18:33:47 GMT

In message <200408182116.59691.scohen@javactivity.org>, Steve Cohen writes:
>A diff -u patch file is best.  Please don't send the actual files.
>cvs diff -u [files] >> patchfile.txt

As a reminder, we've previously vetoed changes of this sort (in FTP.java):
     public int sendCommand(String command, String args) throws IOException
     {
+        if ((__commandBuffer == null) || (_controlOutput == null))
+        {
+            throw new IOException("Not connected.");
+        }

I'd suggest that particular part of the patch not be applied.  It's
incumbent on the caller to not continue to use the object after an
exception has been thrown.  What may make sense to do is move the
assignment of _isConnected_ in SocketClient.disconnect up to the
beginning of the method in case one of the close() calls throws an
exception.  Basically, as the docs say, if something bad happens,
you're supposed to call disconnect in the exception handler.

daniel



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message