commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] Updated: (CLI-123) the minimum and maximum constraints on a group do not take other groups into account
Date Mon, 21 Jul 2008 19:55:33 GMT

     [ https://issues.apache.org/jira/browse/CLI-123?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oliver Heger updated CLI-123:
-----------------------------

    Attachment: patchCLI123.patch

A proposed fix for this issue:

An option now stores a reference to its parent group. When an option is added to a command
line its parents are also added. So a command line also keeps track of the groups involved.

> the minimum and maximum constraints on a group do not take other groups into account
> ------------------------------------------------------------------------------------
>
>                 Key: CLI-123
>                 URL: https://issues.apache.org/jira/browse/CLI-123
>             Project: Commons CLI
>          Issue Type: Bug
>          Components: CLI-2.x
>    Affects Versions: 2.0
>            Reporter: Andrew Shirley
>            Priority: Minor
>             Fix For: 2.0
>
>         Attachments: BugCLI123Test.java, patchCLI123.patch
>
>
> If you have a Group A as a child of Group B and you set a minimum or maximum on Group
B, the presence or not of Group A will not affect GroupB. This is because Groups are never
added to a CommandLine so .hasOption(A) returns false and so it isn't counted. WriteableCommandLine#addOption(Option)
should be used to indicate that a Group is present if any of a Groups children is present.

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


Mime
View raw message