Greg Toombs created CLI-251:
-------------------------------

             Summary: Groups cannot be reused
                 Key: CLI-251
                 URL: https://issues.apache.org/jira/browse/CLI-251
             Project: Commons CLI
          Issue Type: Bug
          Components: CLI-2.x, Options definition, Validation
    Affects Versions: 2.0
            Reporter: Greg Toombs
            Priority: Minor


In GroupImpl.java, the code after this comment:

            // if the child option is present then validate it

ends up rejecting what should be valid command-line args. If you make a group 
and use it as a child in more than one parent, which is a wholly reasonable 
usage of the API, I think the child only registers one parent and then the "int 
present" counting goes over its maximum and the args are rejected. hasOption 
returns a false positive.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to