Skip to content

DataBinder direct field access ignores auto-grow collection limit #36861

Description

@mkurz

DataBinder applies its autoGrowCollectionLimit to bean-property binding, but direct-field binding does not apply the same limit to the underlying DirectFieldAccessor.

With the default limit of 256, binding items[255].name succeeds for both bean-property binding and direct-field binding, as expected.

Binding items[256].name is rejected for bean-property binding, but succeeds after calling initDirectFieldAccess().

Reproducer:
https://github.com/mkurz/spring-direct-field-autogrow-repro

Expected behavior:
Direct-field binding should reject items[256].name the same way bean-property binding does.

Actual behavior:
Direct-field binding grows the collection past the configured limit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions