|
|
@ -116,11 +116,15 @@ public abstract class AbstractNamedValueMethodArgumentResolver implements Handle |
|
|
|
if (parameter != nestedParameter || !ClassUtils.isAssignableValue(parameter.getParameterType(), arg)) { |
|
|
|
if (parameter != nestedParameter || !ClassUtils.isAssignableValue(parameter.getParameterType(), arg)) { |
|
|
|
arg = this.conversionService.convert(arg, TypeDescriptor.forObject(arg), new TypeDescriptor(parameter)); |
|
|
|
arg = this.conversionService.convert(arg, TypeDescriptor.forObject(arg), new TypeDescriptor(parameter)); |
|
|
|
// Check for null value after conversion of incoming argument value
|
|
|
|
// Check for null value after conversion of incoming argument value
|
|
|
|
if (arg == null && namedValueInfo.defaultValue == null && |
|
|
|
if (arg == null) { |
|
|
|
namedValueInfo.required && !nestedParameter.isOptional()) { |
|
|
|
if (namedValueInfo.defaultValue != null) { |
|
|
|
|
|
|
|
arg = resolveEmbeddedValuesAndExpressions(namedValueInfo.defaultValue); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else if (namedValueInfo.required && !nestedParameter.isOptional()) { |
|
|
|
handleMissingValue(namedValueInfo.name, nestedParameter, message); |
|
|
|
handleMissingValue(namedValueInfo.name, nestedParameter, message); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
handleResolvedValue(arg, namedValueInfo.name, parameter, message); |
|
|
|
handleResolvedValue(arg, namedValueInfo.name, parameter, message); |
|
|
|
|
|
|
|
|
|
|
|