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

Groups cannot be reused

    XMLWordPrintableJSON

Details

    Description

      In WriteableCommandLineImpl.java, the code after this comment:

      // ensure that all parent options are also added

      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, because hasOption returns a false positive.

      Attachments

        Activity

          People

            Unassigned Unassigned
            reinderien Greg Toombs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: