Skip to content

Auto-grow nested map values for property writes#36857

Open
yeomin4242 wants to merge 1 commit into
spring-projects:mainfrom
yeomin4242:fix/gh-32154-nested-map-autogrow
Open

Auto-grow nested map values for property writes#36857
yeomin4242 wants to merge 1 commit into
spring-projects:mainfrom
yeomin4242:fix/gh-32154-nested-map-autogrow

Conversation

@yeomin4242
Copy link
Copy Markdown

Closes gh-32154

getPropertyHoldingValue() already has a dedicated auto-grow path for
map values, but that path only handles a single map level.

For a property path such as nestedNestedMap[A][B][C], resolving the
value that should hold the final key returned null before
processKeyedProperty() could write the final map entry.

This PR shares indexed traversal between regular property reads and the
holder lookup used by property writes, enabling missing intermediate map
values to be auto-grown in a single pass.

The change is intentionally scoped to property writes. Regular
getPropertyValue(...) traversal keeps its existing behavior.

Prior to this commit, getPropertyHoldingValue() could auto-grow a
null map value only for a single map level.

For a property path such as nestedNestedMap[A][B][C], resolving the
value that should hold the final key returned null before
processKeyedProperty() could write the final map entry.

This commit shares indexed traversal between regular property reads and
the holder lookup used by property writes, enabling map value
auto-growth only for the holder lookup. Regular getPropertyValue()
traversal keeps its existing behavior.

Closes spring-projectsgh-32154

Signed-off-by: YeongJae Min <whereismysejong@naver.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 1, 2026
@sbrannen sbrannen added in: core Issues in core modules (aop, beans, core, context, expression) type: enhancement A general enhancement labels Jun 1, 2026
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) status: waiting-for-triage An issue we've not yet triaged or decided on type: enhancement A general enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AutoGrow not applied for nested map values

3 participants