You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Daniel F. Savarese" <df...@savarese.org> on 2004/08/19 20:33:47 UTC

Re: [NET] [PATCH] FTPClient to work with FTP servers using a Japanese locale. [UPDATE]

In message <20...@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