Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 32959 invoked from network); 12 Sep 2006 08:26:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Sep 2006 08:26:50 -0000 Received: (qmail 67747 invoked by uid 500); 12 Sep 2006 08:26:47 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 67681 invoked by uid 500); 12 Sep 2006 08:26:47 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 67670 invoked by uid 99); 12 Sep 2006 08:26:47 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Sep 2006 01:26:47 -0700 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests= Received: from ([209.237.227.198:43413] helo=brutus.apache.org) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id A8/93-00869-25F66054 for ; Tue, 12 Sep 2006 01:26:59 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 5F10441000E for ; Tue, 12 Sep 2006 08:23:23 +0000 (GMT) Message-ID: <24188685.1158049403384.JavaMail.jira@brutus> Date: Tue, 12 Sep 2006 01:23:23 -0700 (PDT) From: "David Leal (JIRA)" To: commons-dev@jakarta.apache.org Subject: [jira] Updated: (CLI-125) Invokes Date Validator for a Date type (fail on real example) In-Reply-To: <15612661.1158048382423.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/CLI-125?page=all ] David Leal updated CLI-125: --------------------------- Attachment: TestBatchCallerCommandLineParser.java The testing class, the test fails when testing the method: testRealExamples. > Invokes Date Validator for a Date type (fail on real example) > ------------------------------------------------------------- > > Key: CLI-125 > URL: http://issues.apache.org/jira/browse/CLI-125 > Project: Commons CLI > Issue Type: Bug > Affects Versions: Nightly Builds > Reporter: David Leal > Attachments: com.zip, TestBatchCallerCommandLineParser.java > > > Dear Sr, > I would like to send a fail I have found when testing my real Command Line Parser example. I have the command line class definition and also the corresponding testing file. (I will try to add an atachment file). > The file occurs because it miss understand probably som option definition and it try to validate a Date type with a date validator which is wrong. I can't isolate the situation for the moment, but on the testing class you will see exaclty what happend. > The file occurs with this situation: > args = new String[]{"-holders-options", "-local", "-f", "nada.es", > "-movements-options", "-date", "D-3", "-positions-options", > "-local", "-f", "otroNada.txt", "all"}; > parser.parse(args); > but with this: > args = new String[]{"-holders-options", "-local", "-f", "nada.es", > "-movements-options", "-date", "D-3", "holders", "movements"}; > parser.parse(args); > it doesn't happend. The -movements-options, -holders-options, -position-options are group of options. If you invoke the just the option -help you will see the documentation about the input argument options, also running the test you will get an output file: > TestBatchCallerCommandLineParser.out with this output (englis/spanish, it depends of your local configuration). > I have defined a DisplaceDateValidator, that extends DateValidator, it just convert a displace date operator (D-n) in the corresponding date (current day minus n-days). This validator works, the problem comes when I want to invoke the parser with more group of options. As you can see on the source code the algorithm for creating -holders-options, -movements-options, -positions-options, so having one or two or more group options has to be treated on the same way. > Thanks, > David -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org