Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 8886 invoked from network); 24 Mar 2008 19:49:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Mar 2008 19:49:34 -0000 Received: (qmail 23456 invoked by uid 500); 24 Mar 2008 19:49:31 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 23373 invoked by uid 500); 24 Mar 2008 19:49:30 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 23364 invoked by uid 99); 24 Mar 2008 19:49:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Mar 2008 12:49:30 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Mar 2008 19:48:49 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 25B53234C0E6 for ; Mon, 24 Mar 2008 12:47:26 -0700 (PDT) Message-ID: <1640527106.1206388046153.JavaMail.jira@brutus> Date: Mon, 24 Mar 2008 12:47:26 -0700 (PDT) From: "Mauricio Hiroshi Nagaoka (JIRA)" To: issues@commons.apache.org Subject: [jira] Issue Comment Edited: (NET-188) FTPClient#listFiles returns null element when file's timestamp is "02/29" In-Reply-To: <1838758804.1203934971378.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/NET-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12581653#action_12581653 ] mhnagaoka edited comment on NET-188 at 3/24/08 12:47 PM: ------------------------------------------------------------------------ Don't you guys think that the piece of code below: {{monospaced}} if (lenientFutureDates) { // add a day to "now" so that "slop" doesn't cause a date // slightly in the future to roll back a full year. (Bug 35181) now.add(Calendar.DATE, 1); } if (working.after(now)) { working.add(Calendar.YEAR, -1); } {{monospaced}} should also be executed when the hackFormatter is used? Rather than only when the recentDateFormat is used? was (Author: mhnagaoka): Don't you guys think that the piece of code below: {{monospaced}}if (lenientFutureDates) { {{monospaced}} // add a day to "now" so that "slop" doesn't cause a date {{monospaced}} // slightly in the future to roll back a full year. (Bug 35181) {{monospaced}} now.add(Calendar.DATE, 1); {{monospaced}}} {{monospaced}}if (working.after(now)) { {{monospaced}} working.add(Calendar.YEAR, -1); {{monospaced}}} should also be executed when the hackFormatter is used? Rather than only when the recentDateFormat is used? > FTPClient#listFiles returns null element when file's timestamp is "02/29" > ------------------------------------------------------------------------- > > Key: NET-188 > URL: https://issues.apache.org/jira/browse/NET-188 > Project: Commons Net > Issue Type: Bug > Affects Versions: 1.4 > Reporter: HONMA Hirotaka > Attachments: commons-net-ftp-date-parser-feb29.patch, DstParseTest.java, FTPTimestampParserLeap.patch, jan01.patch > > > 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: > {code} > [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 > {code} > test code: > {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(); > } > {code} > results bellow. > {code} > [0] -rw-r--r-- 1 0 0 0 Dec 18 2006 aaa.txt > [1] null > {code} > Second element(bbb.txt) should not be null. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.