Apache Commons logo Commons CLI
Apache Commons CLI ™
  • Last Published: 08 Nov 2025
  • |
  • Version: 1.11.0

CPD Results

The following document contains the results of PMD's CPD 7.17.0.

Duplications

File Line
org/apache/commons/cli/DefaultParser.java 501
org/apache/commons/cli/Parser.java 271
private void handleProperties(final Properties properties) throws ParseException {
 if (properties == null) {
 return;
 }
 for (final Enumeration<?> e = properties.propertyNames(); e.hasMoreElements();) {
 final String option = e.nextElement().toString();
 final Option opt = options.getOption(option);
 if (opt == null) {
 throw new UnrecognizedOptionException("Default option wasn't defined", option);
 }
 // if the option is part of a group, check if another option of the group has been selected
 final OptionGroup optionGroup = options.getOptionGroup(opt);
 final boolean selected = optionGroup != null && optionGroup.isSelected();
 if (!cmd.hasOption(option) && !selected) {
 // get the value from the properties
 final String value = properties.getProperty(option);
 if (opt.hasArg()) {
 if (opt.isValuesEmpty()) {

Copyright © 2002-2025 The Apache Software Foundation. All Rights Reserved.

Apache Commons, Apache Commons CLI, Apache, the Apache logo, and the Apache Commons project logos are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners.

AltStyle によって変換されたページ (->オリジナル) /