Skip to content

WebDataBinder unnecessarily instantiates collections when using the "!" and "_" prefixesΒ #36625

Closed

Description

@bclozel

Initially reported by @otmaneomry out of band.

The WebDataBinder supports "field marker" "_" and "default marker" "!" prefixes when binding requests to form objects.

It appears that when specific fields are not allowed for binding, the implementation might still instantiate/autogrow collections to be bound when it's not necessary.

Because binding will occur and no effect is expected, we should save the object allocation and perform checks before the default/field marker support.

Activity

  1. added this to the 6.2.18 milestone on Apr 8, 2026
  2. self-assigned this
    on Apr 8, 2026
  3. added
    in: webIssues in web modules (web, webmvc, webflux, websocket)
    on Apr 8, 2026
  4. modified the milestones: 6.2.18, 7.0.7 on Apr 8, 2026
  5. added
    type: backportAn issue that is a backport of another issue to a maintenance branch
    for: backport-to-7.0.xMarks an issue as a candidate for backport to 7.0.x
    and removed
    type: backportAn issue that is a backport of another issue to a maintenance branch
    on Apr 8, 2026
  6. added
    status: backportedAn issue that has been backported to maintenance branches
    and removed
    for: backport-to-7.0.xMarks an issue as a candidate for backport to 7.0.x
    on Apr 8, 2026
  7. changed the title [-]WebDataBinder unnessarily instantiates collections when using the "!" "_" prefixes[/-] [+]WebDataBinder unnecessarily instantiates collections when using the "!" "_" prefixes[/+] on Apr 8, 2026
  8. added a commit that references this issue on Apr 9, 2026
    e4d03f6
  9. changed the title [-]WebDataBinder unnecessarily instantiates collections when using the "!" "_" prefixes[/-] [+]WebDataBinder unnecessarily instantiates collections when using the "!" and "_" prefixes[/+] on Apr 16, 2026
  10. self-assigned this
    on Apr 16, 2026
  11. added 4 commits that reference this issue on Apr 16, 2026
    68c575a
    623ccd1
    63817ce
    4e3f264
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions