Issue Details (XML | Word | Printable)

Key: NET-36
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Joseph Hindsley
Votes: 1
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Commons Net

[net] PATCH] FTP and FTPClient changes

Created: 01/Sep/04 02:25 AM   Updated: 08/Mar/08 07:38 PM
Return to search
Component/s: None
Affects Version/s: 1.2
Fix Version/s: 2.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File FTP.java.patch.txt 2004-09-01 02:26 AM Joseph Hindsley 7 kB
Text File FTPClient.java.patch.txt 2004-09-01 02:28 AM Joseph Hindsley 2 kB
Text File FTPTest.java.patch.txt 2004-09-01 02:27 AM Joseph Hindsley 89 kB
Text File FTPTest.java.patch.txt 2004-09-01 02:26 AM Joseph Hindsley 89 kB
Environment:
Operating System: other
Platform: Other

Bugzilla Id: 30970
Resolution Date: 08/Mar/08 07:38 PM


 Description  « Hide
I've included 3 patch files for changes I've made to the FTP andFTPClient
classes in the commons-net package.

The first patch is for the FTP class making it extend SocketClientinstead of
TelnetClient. I noticed that the behavior of theTelnetClient's input stream
reader thread was effectively ignoring thesocket's SOTimeout causing reads to
hang forever if the server decidednot to respond to a client request at all.
This should also answer oneof the goals from the TODO list:

"Divorce FTPClient from TelnetClient, getting rid of the TelnetClientthreads
which cause problems on some platforms (e.g., MacOS)."

The second patch is for an FTPTest unit test. I've covered most of thebasic
methods (connect(), disconnect(), sendCommand(), getReplyCode(),etc). Ignored
for now are the convenience methods since they all callsendCommand() underneath.
Part of the FTPTest class is a DummyFTPServerinner class which is used to
communicate to the test FTP class - don'tknow if that would be useful elsewhere
(maybe part of FTPClient unittests), so you might consider making it a utility
class for other unittests.

Finally I've attached a patch for minor changes to FTPClient:

  • changed __storeFile() from private to protected so that it can beused by
    classes that extend FTPClient
  • added __storeFile(String, String) method - so that the commands itaccepts are
    not limited to what's found in FTPCommand. Note: the__storeFile(int, String)
    method now calls the __storeFile(String,String) method.
  • added openDataConnection(String, String) method - so that thecommands it
    accepts are not limited to what's found in FTPCommand. Note:the
    openDataConnection(int, String) method now calls
    the_openDataConnection_(String, String) method.

Hopefully you'll find the changes agreeable and will incorporate theminto the
code base.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Henri Yandell made changes - 16/May/06 09:45 AM
Field Original Value New Value
issue.field.bugzillaimportkey 30970 12341677
Henri Yandell made changes - 16/May/06 11:48 AM
Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
Key COM-1525 NET-36
Component/s Net [ 12311127 ]
Affects Version/s 1.2 Final [ 12311661 ]
Project Commons [ 12310458 ] Commons Net [ 12310487 ]
Henri Yandell made changes - 16/May/06 12:21 PM
Affects Version/s 1.2 Final [ 12311773 ]
Rory Winston made changes - 20/Dec/06 10:13 AM
Status Resolved [ 5 ] Closed [ 6 ]
Henri Yandell made changes - 20/Sep/07 05:25 AM
Status Closed [ 6 ] Reopened [ 4 ]
Rory Winston made changes - 08/Mar/08 07:38 PM
Fix Version/s 2.0 [ 12312040 ]
Resolution Fixed [ 1 ]
Status Reopened [ 4 ] Closed [ 6 ]