Return-Path: Delivered-To: apmail-commons-issues-archive@locus.apache.org Received: (qmail 77155 invoked from network); 29 Feb 2008 14:19:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Feb 2008 14:19:56 -0000 Received: (qmail 12677 invoked by uid 500); 29 Feb 2008 14:19:47 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 12563 invoked by uid 500); 29 Feb 2008 14:19:47 -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 12509 invoked by uid 99); 29 Feb 2008 14:19:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Feb 2008 06:19:47 -0800 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; Fri, 29 Feb 2008 14:19:09 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 51C9B234C060 for ; Fri, 29 Feb 2008 06:18:51 -0800 (PST) Message-ID: <1843568855.1204294731333.JavaMail.jira@brutus> Date: Fri, 29 Feb 2008 06:18:51 -0800 (PST) From: "Dmitry Negoda (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=12573755#action_12573755 ] ndv edited comment on NET-188 at 2/29/08 6:18 AM: ------------------------------------------------------------ I've figured out the the real problem is setLenient (false). A lenient SDF parses Feb 29 correctly. I wonder if is there any reason to use non-lenient SDF? What if just remove setLenient(false)? was (Author: ndv): I've figured out the the real problem is setLenient (false). The lenient SDF parses Feb 29 correctly. I wonder, is there any reason to use non-lenient SDF? What if just remove setLenient(false)? > 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 > > 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.