commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 31918] New: - javadoc FTPClient inconsistent
Date Wed, 27 Oct 2004 14:55:52 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=31918>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=31918

javadoc FTPClient inconsistent

           Summary: javadoc FTPClient inconsistent
           Product: Commons
           Version: 1.2 Final
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Net
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: olivier.bedelet@med.ge.com


The javadoc of ftpclient says :
you must first connect to the server with connect before doing anything, and
finally disconnect after you're completely finished interacting with the server

but the given source code doesn't disconnect if ftp.connect("ftp.foobar.com");
succeed

change proposal:
replace in FTPClient javaDoc

     if(!FTPReply.isPositiveCompletion(reply)) {
        ftp.disconnect();
        System.err.println("FTP server refused connection.");
        System.exit(1);
      }
    } catch(IOException e) {
      if(ftp.isConnected()) 

by

     if(!FTPReply.isPositiveCompletion(reply)) {
        ftp.disconnect();
        System.err.println("FTP server refused connection.");
        System.exit(1);
      }
     ftp.disconnect();
    } catch(IOException e) {
      if(ftp.isConnected())

---------------------------------------------------------------------
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