Revised handling of missing data class arguments

Includes unified detection of Kotlin's optional parameters in MethodParameter.isOptional(), reduces BeanUtils.findPrimaryConstructor to Kotlin semantics (for reuse in AutowiredAnnotationBeanPostProcessor), and finally introduces a common KotlinDetector delegate with an isKotlinType(Class) check.

Issue: SPR-15877
Issue: SPR-16020
This commit is contained in:
Juergen Hoeller
2017-09-28 00:31:12 +02:00
parent d3129a8bd7
commit ec345bf162
14 changed files with 204 additions and 344 deletions

View File

@@ -102,7 +102,8 @@ public class FieldError extends ObjectError {
@Override
public String toString() {
return "Field error in object '" + getObjectName() + "' on field '" + this.field +
"': rejected value [" + this.rejectedValue + "]; " + resolvableToString();
"': rejected value [" + ObjectUtils.nullSafeToString(this.rejectedValue) + "]; " +
resolvableToString();
}
@Override