in src/main/java/org/apache/commons/cli/CommandLine.java [570:583]
public <T> T getParsedOptionValue(final Option option, final Supplier<T> defaultValue) throws ParseException {
if (option == null) {
return get(defaultValue);
}
final String res = getOptionValue(option);
try {
if (res == null) {
return get(defaultValue);
}
return (T) option.getConverter().apply(res);
} catch (final Exception e) {
throw ParseException.wrap(e);
}
}