Issue Details (XML | Word | Printable)

Key: NET-188
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: HONMA Hirotaka
Votes: 32
Watchers: 28
Operations

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

FTPClient#listFiles returns null element when file's timestamp is "02/29"

Created: 25/Feb/08 10:22 AM   Updated: 26/Jun/08 09:57 AM
Return to search
Component/s: None
Affects Version/s: 1.4
Fix Version/s: 2.0, 1.5

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works commons-net-ftp-date-parser-feb29.patch 2008-02-29 04:10 PM Ingo Weinhold 1 kB
Java Source File DstParseTest.java 2008-03-03 12:48 PM Brian Phillips 0.5 kB
Text File Licensed for inclusion in ASF works FTPTimestampParserImpl.patch 2008-05-13 04:58 PM Andre Sudhoff 5 kB
Text File Licensed for inclusion in ASF works FTPTimestampParserLeap.patch 2008-03-12 08:19 PM Sebb 4 kB
Text File Licensed for inclusion in ASF works jan01.patch 2008-03-16 12:56 PM Martin Oberhuber 0.7 kB
Issue Links:
Blocker
 
Duplicate
 
Reference

Resolution Date: 15/May/08 10:02 PM


 Description  « Hide
This issue has same cause as VALIDATOR-221.
org.apache.commons.net.ftp.parser.FTPTimestampParserImpl#parseTimestamp throws ParseException with timestampStr = "Feb 29 11:22".

FTP Server status:

[root@localhost test-commonsnet]# pwd
/tmp/test-commonsnet
[root@localhost test-commonsnet]# ls -l
total 0
-rw-r--r--  1 root root 0 Dec 19  2006 aaa.txt
-rw-r--r--  1 root root 0 Feb 29 11:22 bbb.txt

test code:

public void testCommonsNetLeapDay() throws Exception {
    final FTPClient ftp = new FTPClient();
    ftp.connect(host);
    ftp.login(user, password);
    final FTPFile[] listFiles = ftp.listFiles("/tmp/test-commonsnet");
    for (int i = 0; i < listFiles.length; i++) {
        System.out.println("[" + i + "] " + listFiles[i]);
    }
    ftp.disconnect();
}

results bellow.

[0] -rw-r--r--    1 0        0               0 Dec 18  2006 aaa.txt
[1] null

Second element(bbb.txt) should not be null.



 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
No work has yet been logged on this issue.