fixed: missing null check
@@ -621,6 +621,7 @@ public class JCommander {
Class<?> cls = object.getClass();
Parameters parameters = cls.getAnnotation(Parameters.class);
+ if (parameters != null) {
Class<? extends IParametersValidator>[] parametersValidatorClasses = parameters.parametersValidators();
for (Class<? extends IParametersValidator> parametersValidatorClass : parametersValidatorClasses) {
try {
@@ -630,6 +631,7 @@ public class JCommander {
throw new ParameterException("Cannot instantiate rule: " + parametersValidatorClass, e);
}
}
+ }
List<Parameterized> parameterizeds = parameterizedParser.parseArg(object);
for (Parameterized parameterized : parameterizeds) {
