Skip to content

Commit 2a0540c

Browse files
joshistepoutsma
authored andcommitted
Move init of excchangeStrategies to default ctor in DefaultWebClientBuilder
When the copy constructor is used the exchangeStrategies need not to be initialized as they are set in the copyconstructor fixes SPR-16771
1 parent d44f1ca commit 2a0540c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClientBuilder.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,14 @@ class DefaultWebClientBuilder implements WebClient.Builder {
6363
@Nullable
6464
private ClientHttpConnector connector;
6565

66-
private ExchangeStrategies exchangeStrategies = ExchangeStrategies.withDefaults();
66+
private ExchangeStrategies exchangeStrategies;
6767

6868
@Nullable
6969
private ExchangeFunction exchangeFunction;
7070

7171

7272
public DefaultWebClientBuilder() {
73+
this.exchangeStrategies = ExchangeStrategies.withDefaults();
7374
}
7475

7576
public DefaultWebClientBuilder(DefaultWebClientBuilder other) {

0 commit comments

Comments
 (0)