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

HelpFormatter is only able to print last option that has a longOpt and no shortOpt.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Incomplete
    • 1.0
    • None
    • None
    • None
    • Operating System: Linux
      Platform: PC

    • 21349

    Description

      When having more that one option that only has a longOpt and no shortOpt, only
      the last option of these will be printed by the HelpFormatter.

      in Options.java this should fix the problem:

      212c212,214
      < return new ArrayList( shortOpts.values() );

      > Set tmpSet = new HashSet(longOpts.values());
      > tmpSet.addAll(shortOpts.values());
      > return new ArrayList( tmpSet );

      Attachments

        Activity

          People

            Unassigned Unassigned
            jsd@oncable.dk Jesper S. Damgaard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: