You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Oliver Heger (JIRA)" <ji...@apache.org> on 2008/07/27 22:37:31 UTC

[jira] Resolved: (CLI-159) The required property for the child groups of a group should be more consistent

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

Oliver Heger resolved CLI-159.
------------------------------

    Resolution: Fixed

A fix has been applied.

When creating a group its required flag can now be set explicitly (it is true per default, so the default behavior of groups was not changed by this fix). If set to false and if this group is used as a child group in another group, the minimum/maximum constraints are not evaluated unless options of it are present on the command line. Thus the child group can be declared as optional.

> The required property for the child groups of a group should be more consistent
> -------------------------------------------------------------------------------
>
>                 Key: CLI-159
>                 URL: https://issues.apache.org/jira/browse/CLI-159
>             Project: Commons CLI
>          Issue Type: Bug
>          Components: CLI-2.x
>    Affects Versions: 2.0
>            Reporter: Oliver Heger
>             Fix For: 2.0
>
>
> Currently restrictions defined for a child group can also affect the parent group. For instance, if for the child group a minimum constraint greater than 0 is set, the parent group will implicitly become required, even if its minimum is set to 0.
> This is counter-intuitive. It would be more consistent if the minimum and maximum constraints of the parent group were independent of the settings in the child groups. Then it would be possible to model constellations like an optional parent group with a child group that has required elements (i.e. the child group is optional, but if it is present, all required elements must be provided).

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