commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <>
Subject [jira] Closed: (CLI-61) [cli] argument defaults prevent commandline usage.
Date Mon, 09 Jun 2008 07:37:45 GMT


Henri Yandell closed CLI-61.

    Resolution: Fixed

Applying Andrew's fix on top of Brian's fix to CLI-145. Rolling back the addition of getMessageKey
to OptionException. 

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

View raw message