Description
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.
Attachments
Issue Links
- links to