[jcifs] Interrupted connect

Thomas Krammer Thomas_Krammer at avid.com
Thu Nov 24 10:52:36 GMT 2005



>>Hi everyone,
>>
>>I found a bug in jcifs.util.transport.Transport. If the thread executing 
>>Transport.connect() is interrupted all following connect() calls fail 
>>with a TransportException "Invalid state: 1".
>>
>>The reason for this is that the state isn't reset by the 
>>InterruptedException handler.
>>
>>The attached patch fixes this problem.
> 
> 
> Ok, I'll add this to The List.
> 
> Just out of curiousity, under what conditions would the transport thread
> be interrupted?
> 

We created a JCifsFileSystemView that allows to browse the Windows 
domain in a JFileChooser. The JFileChooser calls the FileSystemView in a 
background thread. That thread is interrupted during the showDialog() 
call of the JFileChooser. Depending on the timing this might interrupt 
the connect() call since enumeration of the initial directory already 
started.


More information about the jcifs mailing list