Method execution should not error without value
- Do npe check when getting class type out from incoming value. - Fix #572
This commit is contained in:
@@ -183,8 +183,10 @@ public interface CommandExecution {
|
||||
if (parameterName == null) {
|
||||
return false;
|
||||
}
|
||||
Class<?> sourceType = paramValues.get(parameterName) != null ? paramValues.get(parameterName).getClass()
|
||||
: null;
|
||||
return paramValues.containsKey(parameterName) && conversionService
|
||||
.canConvert(paramValues.get(parameterName).getClass(), parameter.getParameterType());
|
||||
.canConvert(sourceType, parameter.getParameterType());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user