Skip to content

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

@bclozel

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.

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
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions