Polish and fix test

This commit is contained in:
Phillip Webb 2025-05-06 21:54:25 -07:00
parent 0386fbeb16
commit 62c8d6bcb2
2 changed files with 3 additions and 2 deletions

View File

@ -61,7 +61,8 @@ public final class ReactorHttpClientBuilder {
*/ */
public ReactorHttpClientBuilder withHttpClientCustomizer(UnaryOperator<HttpClient> customizer) { public ReactorHttpClientBuilder withHttpClientCustomizer(UnaryOperator<HttpClient> customizer) {
Assert.notNull(customizer, "'customizer' must not be null"); Assert.notNull(customizer, "'customizer' must not be null");
return new ReactorHttpClientBuilder((t) -> customizer.apply(this.customizer.apply(t))); return new ReactorHttpClientBuilder(this.factory,
(httpClient) -> customizer.apply(this.customizer.apply(httpClient)));
} }
/** /**

View File

@ -55,7 +55,7 @@ class ReactorClientHttpConnectorBuilderTests
httpClients.add(httpClient); httpClients.add(httpClient);
return httpClient; return httpClient;
}; };
ClientHttpRequestFactoryBuilder.reactor() ClientHttpConnectorBuilder.reactor()
.withHttpClientCustomizer(httpClientCustomizer1) .withHttpClientCustomizer(httpClientCustomizer1)
.withHttpClientCustomizer(httpClientCustomizer2) .withHttpClientCustomizer(httpClientCustomizer2)
.build(); .build();