Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 70615 invoked from network); 18 Apr 2006 08:25:51 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 Apr 2006 08:25:51 -0000 Received: (qmail 39477 invoked by uid 500); 18 Apr 2006 08:25:47 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 39397 invoked by uid 500); 18 Apr 2006 08:25: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 39386 invoked by uid 99); 18 Apr 2006 08:25:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Apr 2006 01:25:47 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [217.147.92.82] (HELO knox.decisionsoft.com) (217.147.92.82) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Apr 2006 01:25:46 -0700 Received: from itchen.dsl.local ([10.0.0.65]) by knox.decisionsoft.com with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA:32) (Exim 4.50) id 1FVlWY-0004LS-2g for commons-dev@jakarta.apache.org; Tue, 18 Apr 2006 09:25:26 +0100 Received: from aks by itchen.dsl.local with local (Exim 4.43) id 1FVlWW-00084W-R5 for commons-dev@jakarta.apache.org; Tue, 18 Apr 2006 09:25:24 +0100 Date: Tue, 18 Apr 2006 09:25:24 +0100 From: Andrew Shirley To: Jakarta Commons Developers List Subject: Re: [cli][patch] parsing option arguments which have a default Message-ID: <20060418082524.GO9581@itchen.dsl.local> References: <20060413141924.GD9581@itchen.dsl.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060413141924.GD9581@itchen.dsl.local> User-Agent: mutt-ng/devel-r774 (Linux) Sender: "Andrew Shirley,,,07909933820" X-SA-Exim-Connect-IP: 10.0.0.65 X-SA-Exim-Mail-From: aks@decisionsoft.com X-SA-Exim-Scanned: No (on knox.decisionsoft.com); SAEximRunCond expanded to false X-Loop: systemfilter.decisionsoft.com X-SystemFilter: [commons-dev] special address (mailing list) - skipping expansion X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Thu, Apr 13, 2006 at 03:19:24PM +0100, Andrew Shirley wrote: > Hi, > > I have found a bug in the following scenario: > You have an option which can take a single argument which in turn has a default > value. You supply a value on the command line which is intended to override > this default however as the CommandLine already has a value for this Option, > this second value is not allowed and the command line cannot be parsed. > > I have created a patch which adds a method to WritableCommandLine and its Impl > which allows you to retrieve the undefaulted values for an Option. I have then > changed ArgumentImpl to use this method to determine the argument count > > Please find attached a patch and a testsuite. This has now been added to bugzilla. http://issues.apache.org/bugzilla/show_bug.cgi?id=39335 cheers Andrew Shirley --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org