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 35185] New: - [net] NullpointerException on FTPClient.disconnect() if an Exception occured while FTPClient.connect
Date Thu, 02 Jun 2005 12:41:09 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=35185>.
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=35185

           Summary: [net] NullpointerException on FTPClient.disconnect() if
                    an Exception occured while FTPClient.connect
           Product: Commons
           Version: 1.2 Final
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Net
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: christian.hufgard@gmx.de


Hello,

think this bug is the same (or at least similiar) to the following one:
http://issues.apache.org/bugzilla/show_bug.cgi?id=26296
but since I was not sure, I opened it as a seperate report.

Versions affected: commons-net-1.2.2, think also commons-net-1.4.0

Problem: If an exception occures while FTPClient.connect() is running, a call to 
FTPClient.disconnect() in a finally-block might throw a NullPointerException.
I am pretty shure, that this might cause some Threads so keep alive, also they 
cannot be interrupted anymore.

Reason: This happens since TelnetClient.disconnect() does not check whether the 
Streams (__input and __ouput) it tries to close are NULL or not.
Normally it is sufficent to check FTPClient.isConnected(), but if a exceptions 
is thrown after SocketClient.__connectAction_ has been excecuted, SocketClient.
_isConnected_ is set to true, so the check will indicate that the connection is 
alive.

Christian

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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