mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Expose autoGrowCollectionLimit in ConfigurablePropertyAccessor interface
See gh-36862
This commit is contained in:
@@ -273,8 +273,9 @@ public class DataBinder implements PropertyEditorRegistry, TypeConverter {
|
||||
* Specify the limit for array and collection auto-growing.
|
||||
* <p>Default is 256, preventing OutOfMemoryErrors in case of large indexes.
|
||||
* Raise this limit if your auto-growing needs are unusually high.
|
||||
* <p>Used for setter/field injection via {@link #bind(PropertyValues)}, and not
|
||||
* applicable to constructor binding via {@link #construct}.
|
||||
* <p>Used for setter injection - and as of 7.1 also for field injection -
|
||||
* via {@link #bind(PropertyValues)}; not applicable to constructor binding
|
||||
* via {@link #construct}.
|
||||
* @see #initBeanPropertyAccess()
|
||||
* @see org.springframework.beans.BeanWrapper#setAutoGrowCollectionLimit
|
||||
*/
|
||||
|
||||
+1
-2
@@ -19,7 +19,6 @@ package org.springframework.validation;
|
||||
import org.jspecify.annotations.Nullable;
|
||||
|
||||
import org.springframework.beans.ConfigurablePropertyAccessor;
|
||||
import org.springframework.beans.DirectFieldAccessor;
|
||||
import org.springframework.beans.PropertyAccessorFactory;
|
||||
|
||||
/**
|
||||
@@ -100,7 +99,7 @@ public class DirectFieldBindingResult extends AbstractPropertyBindingResult {
|
||||
this.directFieldAccessor = createDirectFieldAccessor();
|
||||
this.directFieldAccessor.setExtractOldValueForEditor(true);
|
||||
this.directFieldAccessor.setAutoGrowNestedPaths(this.autoGrowNestedPaths);
|
||||
((DirectFieldAccessor) this.directFieldAccessor).setAutoGrowCollectionLimit(this.autoGrowCollectionLimit);
|
||||
this.directFieldAccessor.setAutoGrowCollectionLimit(this.autoGrowCollectionLimit);
|
||||
}
|
||||
return this.directFieldAccessor;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user