Add immutable MultiValueMap wrapper
This commit introduces UnmodifiableMultiValueMap, an immutable wrapper around a MultiValueMap, similar to what is returned by Collections.unmodifiable*. CollectionUtils::unmodifiableMultiValueMap now returns UnmodifiableMultiValueMap. Closes gh-27608
This commit is contained in:
@@ -479,8 +479,9 @@ public class UriComponentsBuilder implements UriBuilder, Cloneable {
|
||||
result = new OpaqueUriComponents(this.scheme, this.ssp, this.fragment);
|
||||
}
|
||||
else {
|
||||
MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>(this.queryParams);
|
||||
HierarchicalUriComponents uric = new HierarchicalUriComponents(this.scheme, this.fragment,
|
||||
this.userInfo, this.host, this.port, this.pathBuilder.build(), this.queryParams,
|
||||
this.userInfo, this.host, this.port, this.pathBuilder.build(), queryParams,
|
||||
hint == EncodingHint.FULLY_ENCODED);
|
||||
result = (hint == EncodingHint.ENCODE_TEMPLATE ? uric.encodeTemplate(this.charset) : uric);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user