WebClient.mutate() should not impact future .mutate() invocations

Before this commit, when adding filters to a builder obtained via
`WebClient.mutate()`, the filters were added both to the original client
as well as the mutated builder. This commit fixes that.

Issue: SPR-16059
This commit is contained in:
Arjen Poutsma
2017-10-13 11:23:10 +02:00
parent 2962f085e5
commit faa74988c4
2 changed files with 16 additions and 5 deletions

View File

@@ -142,7 +142,7 @@ class DefaultWebClient implements WebClient {
@Override
public Builder mutate() {
return this.builder;
return new DefaultWebClientBuilder(this.builder);
}