Fix single-check idiom in `UnmodifiableMultiValueMap` by kilink · Pull Request #35822 · spring-projects/spring-framework

@kilink

Read the respective fields only once in values, entrySet, and keySet methods.

Signed-off-by: Patrick Strawderman <pstrawderman@netflix.com>

@sbrannen sbrannen added the in: core

Issues in core modules (aop, beans, core, context, expression)

label

Nov 15, 2025

@sbrannen sbrannen changed the title Fix single-check idiom in UnmodifiableMultiValueMap Fix single-check idiom in UnmodifiableMultiValueMap

Nov 17, 2025

sbrannen pushed a commit that referenced this pull request

Nov 17, 2025
Read the respective fields only once in the values(), entrySet(), and
keySet() methods.

Closes gh-35822

Signed-off-by: Patrick Strawderman <pstrawderman@netflix.com>

(cherry picked from commit 3b6be3d)