commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Oxspring <roxspr...@imapmail.org>
Subject Re: [cli] commons cli version 2.0?
Date Mon, 04 Oct 2004 10:18:21 GMT
Rob Oxspring wrote:
>> oops, sorry - what I meant was that I can have a Group containing two
>> options, one of which is required and one of which isn't. When it comes
>> to processing that Group the only constraints that seem to be honoured
>> are the setMinimum and setMaximum. So for example if you had a Group
>> with required options r1,r2,r3 and not required options n1,n2,n3 then
>> you can't use the number of present options alone as the validation
>> predicate as eg. requiring a minimum of three options would allow
>> n1,n2,n3
>>
>> I've attached a test-case RequiredWithinGroupTest.java that hopefully
>> demonstrates this (it works on my machine:) but if your answer is that
>> this is the intended behaviour then I guess its not an error - but is
>> there an alternate way to achieve the following?
>>
>>     umbrella-tool --umbrella-tool-option1 command --required1
>> --required2 --required3 --nonrequired1 --nonrequired3 --nonrequired3
> 
> 
> Hmmm, this sounds like a bug.  I'll investigate the testcase and report 
> back.
> 

Thanks for that, I've added a new test (based on yours) and fixed existing 
ones.  It turns out that GroupImpl was only validating options that are 
present and skipping those that were missing.  I've fixed this in cvs but no 
binary is available yet.

Rob

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message