Fix use of default values
- Change parsing to extract and use option default value and also hook it with @ShellOption. - Fixes #409
This commit is contained in:
@@ -131,6 +131,10 @@ public class StandardMethodTargetRegistrar implements MethodTargetRegistrar, App
|
||||
if (so.arity() > -1) {
|
||||
optionSpec.arity(0, so.arity());
|
||||
}
|
||||
if (!ObjectUtils.nullSafeEquals(so.defaultValue(), ShellOption.NONE)
|
||||
&& !ObjectUtils.nullSafeEquals(so.defaultValue(), ShellOption.NULL)) {
|
||||
optionSpec.defaultValue(so.defaultValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user