Skip to content

Apply auto-grow collection limit to direct field binding#36862

Merged
jhoeller merged 1 commit into
spring-projects:mainfrom
mkurz:fix-direct-field-autogrow-limit
Jun 2, 2026
Merged

Apply auto-grow collection limit to direct field binding#36862
jhoeller merged 1 commit into
spring-projects:mainfrom
mkurz:fix-direct-field-autogrow-limit

Conversation

@mkurz
Copy link
Copy Markdown
Contributor

@mkurz mkurz commented Jun 2, 2026

DataBinder applies its auto-grow collection limit to bean property access, but direct field access left DirectFieldAccessor at its default limit.

Pass DataBinder's configured limit into DirectFieldBindingResult and apply it to the DirectFieldAccessor.

Closes gh-36861

DataBinder applies its auto-grow collection limit to bean
property access, but direct field access left DirectFieldAccessor
at its default limit.

Pass DataBinder's configured limit into DirectFieldBindingResult
and apply it to the DirectFieldAccessor.

Closes spring-projectsgh-36861

Signed-off-by: Matthias Kurz <m.kurz@irregular.at>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 2, 2026
@jhoeller jhoeller self-assigned this Jun 2, 2026
@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 2, 2026
@jhoeller jhoeller added this to the 7.1.0-M1 milestone Jun 2, 2026
@jhoeller jhoeller merged commit 481a574 into spring-projects:main Jun 2, 2026
5 checks passed
@mkurz mkurz deleted the fix-direct-field-autogrow-limit branch June 2, 2026 15:04
@jhoeller
Copy link
Copy Markdown
Contributor

jhoeller commented Jun 2, 2026

Good catch, thanks for the PR! I've refined the implementation to expose the autoGrowCollectionLimit flag in the ConfigurablePropertyAccessor interface, along the lines of autoGrowNestedPaths. Also, we'll fix the 6.1-era javadoc note in the older branches so that the javadoc there correctly reflects the original applicability: #36863.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DataBinder direct field access ignores auto-grow collection limit

3 participants