Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.2k views
in Java FTP by (140 points)
I use my own parser and pass an instance to FTPFileFactory when creating a new FTPClient instance. Given that I do not change any other parameters of the FTPClient, I did not expect to lose my parser instance, but FTPClient.quit() sets fileFactory to null. After calling quit, I cannot reuse the FTPClient instance for another session to the same server -- I get parsing errors when reading directories because the Unix parser is automatically selected. The setup logic is done at another point, so setting the FTPFileFactory again is not an option.

In the end, this is a minor issue that I have written around. I am just curious on the thinking of how the FTPClient should be used. I would have expected an instance of FTPClient to be reusable for multiple sessions using the same setup parameters.

1 Answer

0 votes
by (162k points)
This is a good point. We won't null fileFactory out in the next release - code already changed.

Categories

...