Uploaded image for project: 'Commons CLI'
  1. Commons CLI
  2. CLI-123

the minimum and maximum constraints on a group do not take other groups into account

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0
    • 2.0
    • CLI-2.x
    • None

    Description

      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.

      Attachments

        1. BugCLI123Test.java
          5 kB
          Oliver Heger
        2. patchCLI123.patch
          4 kB
          Oliver Heger

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aks Andrew Shirley
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: