Create immutable MultiValueMap wrapper #27608
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
type: enhancement
A general enhancement
Milestone
Currently,
CollectionUtils::unmodifiableMultiValueMap
returns an (unmodifiable) copy of the target map, and therefore allocates extra memory. We cannot use theCollections.unmodifiableMap
wrapper in said method, because each value of the map should be immutable as well, and thus needs aCollections.unmodifiableList
wrapper.We should create a
UnmodifiableMultiValueMap
wrapper, similar to the JDKCollections
, that wraps entries and values with immutable counterparts where needed.The text was updated successfully, but these errors were encountered: