You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Claude Warren (Jira)" <ji...@apache.org> on 2024/05/11 10:35:00 UTC

[jira] [Created] (CLI-331) Deprecated option usage is not detected if non string keys are used for resolution.

Claude Warren created CLI-331:
---------------------------------

             Summary: Deprecated option usage is not detected if non string keys are used for resolution.
                 Key: CLI-331
                 URL: https://issues.apache.org/jira/browse/CLI-331
             Project: Commons CLI
          Issue Type: Bug
          Components: CLI-1.x
    Affects Versions: 1.7.0
            Reporter: Claude Warren


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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)