UriComponentsBuilder copies query params through MultiValueMap.addAll

Issue: SPR-17256
This commit is contained in:
Juergen Hoeller
2018-09-10 11:31:37 +02:00
parent e49896d95f
commit c06b9525ac
3 changed files with 15 additions and 2 deletions

View File

@@ -922,4 +922,11 @@ public class UriComponentsBuilderTests {
assertNotEquals(uri1, uri2);
}
@Test // SPR-17256
public void uriComponentsWithQueryParamClone() {
UriComponentsBuilder.fromUriString("http://localhost:8081")
.uriComponents(UriComponentsBuilder.fromUriString("/{path}?sort={sort}").build())
.queryParam("sort", "another_value").build();
}
}