Exclude any Java library type from nested constructor binding
Closes gh-31709
This commit is contained in:
parent
c05b4ce776
commit
d59b2924d3
|
|
@ -1018,7 +1018,8 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter {
|
|||
protected boolean shouldConstructArgument(MethodParameter param) {
|
||||
Class<?> type = param.nestedIfOptional().getNestedParameterType();
|
||||
return !(BeanUtils.isSimpleValueType(type) ||
|
||||
Collection.class.isAssignableFrom(type) || Map.class.isAssignableFrom(type) || type.isArray());
|
||||
Collection.class.isAssignableFrom(type) || Map.class.isAssignableFrom(type) || type.isArray() ||
|
||||
type.getPackageName().startsWith("java."));
|
||||
}
|
||||
|
||||
private void validateConstructorArgument(
|
||||
|
|
|
|||
Loading…
Reference in New Issue