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

The state of the option groups is not updated by the default options

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.1
    • Fix Version/s: 1.3
    • Component/s: Parser
    • Labels:
      None

      Description

      The state of the option groups is neither checked nor updated when the default options passed as a Properties instance to the parse method are processed. For example if 'a' and 'b' are two mutually exclusive options, the command line argument could specify 'a' and the default options could contain 'b', the parser will not complain and the resulting CommandLine will contain 'a' and 'b'.

        Activity

        Hide
        ebourg Emmanuel Bourg added a comment -

        In the case exposed we could either throw an exception or ignore the default option. Ignoring the default option if its group is already set seems more sensible.

        Show
        ebourg Emmanuel Bourg added a comment - In the case exposed we could either throw an exception or ignore the default option. Ignoring the default option if its group is already set seems more sensible.

          People

          • Assignee:
            Unassigned
            Reporter:
            ebourg Emmanuel Bourg
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development