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

Deprecated option usage is not detected if non string keys are used for resolution.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.7.0
    • 1.8.0
    • CLI-1.x
    • None

    Description

      CommandLine.handleDeprecated() is not called if the option key is not a string.

       

      For example getOptionValue() has both String and Option parameter types. 

      • getOptionValue(String) calls handleDeprecated()
      • getOptionValue(Option) does not call handleDeprecated().

      In most cases the String parameter resolves the Option and calls the Option parameter method of the same name.

      The fix is to move the handleDeprecated() into the Option processing path.

      Attachments

        Issue Links

          Activity

            People

              claude Claude Warren
              claude Claude Warren
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: