[ http://issues.apache.org/jira/browse/NET-59?page=all ]
Rory Winston closed NET-59. --------------------------- Fix Version/s: 2.0 Resolution: Fixed Added null check in TelnetClient > [net] NullpointerException on FTPClient.disconnect() if an Exception occured > while FTPClient.connect > ---------------------------------------------------------------------------------------------------- > > Key: NET-59 > URL: http://issues.apache.org/jira/browse/NET-59 > Project: Commons Net > Issue Type: Bug > Affects Versions: 1.2 Final > Environment: Operating System: All > Platform: Other > Reporter: Christian Hufgard > Fix For: 2.0 > > > 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 -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]