diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/http/client/HttpComponentsClientHttpRequestFactoryBuilder.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/http/client/HttpComponentsClientHttpRequestFactoryBuilder.java index 926ddd14dad..d969f62fa1c 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/http/client/HttpComponentsClientHttpRequestFactoryBuilder.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/http/client/HttpComponentsClientHttpRequestFactoryBuilder.java @@ -65,7 +65,7 @@ public final class HttpComponentsClientHttpRequestFactoryBuilder private final Consumer socketConfigCustomizer; - private final Consumer defaultRequestConfigManagerCustomizer; + private final Consumer defaultRequestConfigCustomizer; private final Function tlsSocketStrategyFactory; @@ -85,13 +85,13 @@ public final class HttpComponentsClientHttpRequestFactoryBuilder Consumer httpClientCustomizer, Consumer connectionManagerCustomizer, Consumer socketConfigCustomizer, - Consumer defaultRequestConfigManagerCustomizer, + Consumer defaultRequestConfigCustomizer, Function tlsSocketStrategyFactory) { super(customizers); this.httpClientCustomizer = httpClientCustomizer; this.connectionManagerCustomizer = connectionManagerCustomizer; this.socketConfigCustomizer = socketConfigCustomizer; - this.defaultRequestConfigManagerCustomizer = defaultRequestConfigManagerCustomizer; + this.defaultRequestConfigCustomizer = defaultRequestConfigCustomizer; this.tlsSocketStrategyFactory = tlsSocketStrategyFactory; } @@ -100,7 +100,7 @@ public final class HttpComponentsClientHttpRequestFactoryBuilder Consumer customizer) { return new HttpComponentsClientHttpRequestFactoryBuilder(mergedCustomizers(customizer), this.httpClientCustomizer, this.connectionManagerCustomizer, this.socketConfigCustomizer, - this.defaultRequestConfigManagerCustomizer, this.tlsSocketStrategyFactory); + this.defaultRequestConfigCustomizer, this.tlsSocketStrategyFactory); } @Override @@ -108,7 +108,7 @@ public final class HttpComponentsClientHttpRequestFactoryBuilder Collection> customizers) { return new HttpComponentsClientHttpRequestFactoryBuilder(mergedCustomizers(customizers), this.httpClientCustomizer, this.connectionManagerCustomizer, this.socketConfigCustomizer, - this.defaultRequestConfigManagerCustomizer, this.tlsSocketStrategyFactory); + this.defaultRequestConfigCustomizer, this.tlsSocketStrategyFactory); } /** @@ -122,7 +122,7 @@ public final class HttpComponentsClientHttpRequestFactoryBuilder Assert.notNull(httpClientCustomizer, "'httpClientCustomizer' must not be null"); return new HttpComponentsClientHttpRequestFactoryBuilder(getCustomizers(), this.httpClientCustomizer.andThen(httpClientCustomizer), this.connectionManagerCustomizer, - this.socketConfigCustomizer, this.defaultRequestConfigManagerCustomizer, this.tlsSocketStrategyFactory); + this.socketConfigCustomizer, this.defaultRequestConfigCustomizer, this.tlsSocketStrategyFactory); } /** @@ -137,7 +137,7 @@ public final class HttpComponentsClientHttpRequestFactoryBuilder Assert.notNull(connectionManagerCustomizer, "'connectionManagerCustomizer' must not be null"); return new HttpComponentsClientHttpRequestFactoryBuilder(getCustomizers(), this.httpClientCustomizer, this.connectionManagerCustomizer.andThen(connectionManagerCustomizer), this.socketConfigCustomizer, - this.defaultRequestConfigManagerCustomizer, this.tlsSocketStrategyFactory); + this.defaultRequestConfigCustomizer, this.tlsSocketStrategyFactory); } /** @@ -152,7 +152,7 @@ public final class HttpComponentsClientHttpRequestFactoryBuilder Assert.notNull(socketConfigCustomizer, "'socketConfigCustomizer' must not be null"); return new HttpComponentsClientHttpRequestFactoryBuilder(getCustomizers(), this.httpClientCustomizer, this.connectionManagerCustomizer, this.socketConfigCustomizer.andThen(socketConfigCustomizer), - this.defaultRequestConfigManagerCustomizer, this.tlsSocketStrategyFactory); + this.defaultRequestConfigCustomizer, this.tlsSocketStrategyFactory); } /** @@ -167,7 +167,7 @@ public final class HttpComponentsClientHttpRequestFactoryBuilder Assert.notNull(tlsSocketStrategyFactory, "'tlsSocketStrategyFactory' must not be null"); return new HttpComponentsClientHttpRequestFactoryBuilder(getCustomizers(), this.httpClientCustomizer, this.connectionManagerCustomizer, this.socketConfigCustomizer, - this.defaultRequestConfigManagerCustomizer, tlsSocketStrategyFactory); + this.defaultRequestConfigCustomizer, tlsSocketStrategyFactory); } /** @@ -178,7 +178,7 @@ public final class HttpComponentsClientHttpRequestFactoryBuilder * @param defaultRequestConfigManagerCustomizer the customizer to apply * @return a new {@link HttpComponentsClientHttpRequestFactoryBuilder} instance */ - public HttpComponentsClientHttpRequestFactoryBuilder withDefaultRequestConfigManagerCustomizer( + public HttpComponentsClientHttpRequestFactoryBuilder withDefaultRequestConfigCustomizer( Consumer defaultRequestConfigManagerCustomizer) { Assert.notNull(defaultRequestConfigManagerCustomizer, "'defaultRequestConfigManagerCustomizer' must not be null"); @@ -236,7 +236,7 @@ public final class HttpComponentsClientHttpRequestFactoryBuilder private RequestConfig createDefaultRequestConfig() { RequestConfig.Builder builder = RequestConfig.custom(); - this.defaultRequestConfigManagerCustomizer.accept(builder); + this.defaultRequestConfigCustomizer.accept(builder); return builder.build(); } diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/http/client/HttpComponentsClientHttpRequestFactoryBuilderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/http/client/HttpComponentsClientHttpRequestFactoryBuilderTests.java index 6b5165ff82b..d9c80bab804 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/http/client/HttpComponentsClientHttpRequestFactoryBuilderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/http/client/HttpComponentsClientHttpRequestFactoryBuilderTests.java @@ -55,19 +55,19 @@ class HttpComponentsClientHttpRequestFactoryBuilderTests TestCustomizer httpClientCustomizer2 = new TestCustomizer<>(); TestCustomizer connectionManagerCustomizer = new TestCustomizer<>(); TestCustomizer socketConfigCustomizer = new TestCustomizer<>(); - TestCustomizer defaultRequestConfigManagerCustomizer = new TestCustomizer<>(); + TestCustomizer defaultRequestConfigCustomizer = new TestCustomizer<>(); ClientHttpRequestFactoryBuilder.httpComponents() .withHttpClientCustomizer(httpClientCustomizer1) .withHttpClientCustomizer(httpClientCustomizer2) .withConnectionManagerCustomizer(connectionManagerCustomizer) .withSocketConfigCustomizer(socketConfigCustomizer) - .withDefaultRequestConfigManagerCustomizer(defaultRequestConfigManagerCustomizer) + .withDefaultRequestConfigCustomizer(defaultRequestConfigCustomizer) .build(); httpClientCustomizer1.assertCalled(); httpClientCustomizer2.assertCalled(); connectionManagerCustomizer.assertCalled(); socketConfigCustomizer.assertCalled(); - defaultRequestConfigManagerCustomizer.assertCalled(); + defaultRequestConfigCustomizer.assertCalled(); } @Test