You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Brian Egge (JIRA)" <ji...@apache.org> on 2007/08/22 06:52:30 UTC

[jira] Commented: (CLI-61) [cli] argument defaults prevent commandline usage.

    [ https://issues.apache.org/jira/browse/CLI-61?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12521679 ] 

Brian Egge commented on CLI-61:
-------------------------------

I tested this patch out, and it makes sense.  It's the same issue as CLI-145, and the solution is better than the patch I created.  I would apply this patch, and then apply the test case from CLI-145.

> [cli] argument defaults prevent commandline usage.
> --------------------------------------------------
>
>                 Key: CLI-61
>                 URL: https://issues.apache.org/jira/browse/CLI-61
>             Project: Commons CLI
>          Issue Type: Bug
>          Components: CLI-2.x
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Andrew Shirley
>             Fix For: 2.0
>
>         Attachments: Bug39335Test.java, defaultsBugFix.patch
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.