[
https://issues.apache.org/jira/browse/CLI-336?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17859705#comment-17859705
]
Gary D. Gregory commented on CLI-336:
-------------------------------------
Let's not use "Nightly Builds", it's meaningless since we don't have nightly
builds. We can say this will end up in the next version which is "1.9.0".
> Deprecation use not always reported.
> ------------------------------------
>
> Key: CLI-336
> URL: https://issues.apache.org/jira/browse/CLI-336
> Project: Commons CLI
> Issue Type: Improvement
> Components: CLI-1.x
> Affects Versions: 1.8.0
> Reporter: Claude Warren
> Assignee: Claude Warren
> Priority: Minor
> Fix For: 1.9.0
>
>
> I have a case where I have multiple no-argument options in an OptionGroup.
> The group comprises a deprecated option and a current option. Basically an
> option rename.
> When I check for the option I simply check if (OptionGroup.getSelected() !=
> null). However if the deprecated value is selected this does not print the
> log message that says a deprecated value was selected. The only way I could
> find to do this was to do
> if (OptionGroup.getSelected() != null) {
> commandLine.hasOption(OptionGroup.getSelected());
> ... other processing
> }
> I don't think there is a way to log the issue when the option is selected.
> There are 2 requested changes here:
> # Document the issue in the javadoc for OptionGroup.getSelected() and
> OptionGroup.isSelected() methods.
> # Add a commandLine.hasOption(OptionGroup) method that basically performs the
> OptionGorup equivalent of the commandLine.hasOption(Option) call as well as
> the similar getOptionValue(), getOptionValues(), getParsedOption(), and
> getParsedOptionValues() methods.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)