Skip to content

Commit 223427e

Browse files
committed
Fix withDefaultRequestConfigCustomizer method name
The work `manager` was accidentally included due to a copy/paste mistake. Closes gh-43139
1 parent 042b495 commit 223427e

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/http/client/HttpComponentsClientHttpRequestFactoryBuilder.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public final class HttpComponentsClientHttpRequestFactoryBuilder
6565

6666
private final Consumer<SocketConfig.Builder> socketConfigCustomizer;
6767

68-
private final Consumer<RequestConfig.Builder> defaultRequestConfigManagerCustomizer;
68+
private final Consumer<RequestConfig.Builder> defaultRequestConfigCustomizer;
6969

7070
private final Function<SslBundle, TlsSocketStrategy> tlsSocketStrategyFactory;
7171

@@ -85,13 +85,13 @@ private HttpComponentsClientHttpRequestFactoryBuilder(
8585
Consumer<HttpClientBuilder> httpClientCustomizer,
8686
Consumer<PoolingHttpClientConnectionManagerBuilder> connectionManagerCustomizer,
8787
Consumer<SocketConfig.Builder> socketConfigCustomizer,
88-
Consumer<RequestConfig.Builder> defaultRequestConfigManagerCustomizer,
88+
Consumer<RequestConfig.Builder> defaultRequestConfigCustomizer,
8989
Function<SslBundle, TlsSocketStrategy> tlsSocketStrategyFactory) {
9090
super(customizers);
9191
this.httpClientCustomizer = httpClientCustomizer;
9292
this.connectionManagerCustomizer = connectionManagerCustomizer;
9393
this.socketConfigCustomizer = socketConfigCustomizer;
94-
this.defaultRequestConfigManagerCustomizer = defaultRequestConfigManagerCustomizer;
94+
this.defaultRequestConfigCustomizer = defaultRequestConfigCustomizer;
9595
this.tlsSocketStrategyFactory = tlsSocketStrategyFactory;
9696
}
9797

@@ -100,15 +100,15 @@ public HttpComponentsClientHttpRequestFactoryBuilder withCustomizer(
100100
Consumer<HttpComponentsClientHttpRequestFactory> customizer) {
101101
return new HttpComponentsClientHttpRequestFactoryBuilder(mergedCustomizers(customizer),
102102
this.httpClientCustomizer, this.connectionManagerCustomizer, this.socketConfigCustomizer,
103-
this.defaultRequestConfigManagerCustomizer, this.tlsSocketStrategyFactory);
103+
this.defaultRequestConfigCustomizer, this.tlsSocketStrategyFactory);
104104
}
105105

106106
@Override
107107
public HttpComponentsClientHttpRequestFactoryBuilder withCustomizers(
108108
Collection<Consumer<HttpComponentsClientHttpRequestFactory>> customizers) {
109109
return new HttpComponentsClientHttpRequestFactoryBuilder(mergedCustomizers(customizers),
110110
this.httpClientCustomizer, this.connectionManagerCustomizer, this.socketConfigCustomizer,
111-
this.defaultRequestConfigManagerCustomizer, this.tlsSocketStrategyFactory);
111+
this.defaultRequestConfigCustomizer, this.tlsSocketStrategyFactory);
112112
}
113113

114114
/**
@@ -122,7 +122,7 @@ public HttpComponentsClientHttpRequestFactoryBuilder withHttpClientCustomizer(
122122
Assert.notNull(httpClientCustomizer, "'httpClientCustomizer' must not be null");
123123
return new HttpComponentsClientHttpRequestFactoryBuilder(getCustomizers(),
124124
this.httpClientCustomizer.andThen(httpClientCustomizer), this.connectionManagerCustomizer,
125-
this.socketConfigCustomizer, this.defaultRequestConfigManagerCustomizer, this.tlsSocketStrategyFactory);
125+
this.socketConfigCustomizer, this.defaultRequestConfigCustomizer, this.tlsSocketStrategyFactory);
126126
}
127127

128128
/**
@@ -137,7 +137,7 @@ public HttpComponentsClientHttpRequestFactoryBuilder withConnectionManagerCustom
137137
Assert.notNull(connectionManagerCustomizer, "'connectionManagerCustomizer' must not be null");
138138
return new HttpComponentsClientHttpRequestFactoryBuilder(getCustomizers(), this.httpClientCustomizer,
139139
this.connectionManagerCustomizer.andThen(connectionManagerCustomizer), this.socketConfigCustomizer,
140-
this.defaultRequestConfigManagerCustomizer, this.tlsSocketStrategyFactory);
140+
this.defaultRequestConfigCustomizer, this.tlsSocketStrategyFactory);
141141
}
142142

143143
/**
@@ -152,7 +152,7 @@ public HttpComponentsClientHttpRequestFactoryBuilder withSocketConfigCustomizer(
152152
Assert.notNull(socketConfigCustomizer, "'socketConfigCustomizer' must not be null");
153153
return new HttpComponentsClientHttpRequestFactoryBuilder(getCustomizers(), this.httpClientCustomizer,
154154
this.connectionManagerCustomizer, this.socketConfigCustomizer.andThen(socketConfigCustomizer),
155-
this.defaultRequestConfigManagerCustomizer, this.tlsSocketStrategyFactory);
155+
this.defaultRequestConfigCustomizer, this.tlsSocketStrategyFactory);
156156
}
157157

158158
/**
@@ -167,7 +167,7 @@ public HttpComponentsClientHttpRequestFactoryBuilder withTlsSocketStrategyFactor
167167
Assert.notNull(tlsSocketStrategyFactory, "'tlsSocketStrategyFactory' must not be null");
168168
return new HttpComponentsClientHttpRequestFactoryBuilder(getCustomizers(), this.httpClientCustomizer,
169169
this.connectionManagerCustomizer, this.socketConfigCustomizer,
170-
this.defaultRequestConfigManagerCustomizer, tlsSocketStrategyFactory);
170+
this.defaultRequestConfigCustomizer, tlsSocketStrategyFactory);
171171
}
172172

173173
/**
@@ -178,7 +178,7 @@ public HttpComponentsClientHttpRequestFactoryBuilder withTlsSocketStrategyFactor
178178
* @param defaultRequestConfigManagerCustomizer the customizer to apply
179179
* @return a new {@link HttpComponentsClientHttpRequestFactoryBuilder} instance
180180
*/
181-
public HttpComponentsClientHttpRequestFactoryBuilder withDefaultRequestConfigManagerCustomizer(
181+
public HttpComponentsClientHttpRequestFactoryBuilder withDefaultRequestConfigCustomizer(
182182
Consumer<RequestConfig.Builder> defaultRequestConfigManagerCustomizer) {
183183
Assert.notNull(defaultRequestConfigManagerCustomizer,
184184
"'defaultRequestConfigManagerCustomizer' must not be null");
@@ -236,7 +236,7 @@ private SocketConfig createSocketConfig(ClientHttpRequestFactorySettings setting
236236

237237
private RequestConfig createDefaultRequestConfig() {
238238
RequestConfig.Builder builder = RequestConfig.custom();
239-
this.defaultRequestConfigManagerCustomizer.accept(builder);
239+
this.defaultRequestConfigCustomizer.accept(builder);
240240
return builder.build();
241241
}
242242

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/http/client/HttpComponentsClientHttpRequestFactoryBuilderTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,19 @@ void withCustomizers() {
5555
TestCustomizer<HttpClientBuilder> httpClientCustomizer2 = new TestCustomizer<>();
5656
TestCustomizer<PoolingHttpClientConnectionManagerBuilder> connectionManagerCustomizer = new TestCustomizer<>();
5757
TestCustomizer<SocketConfig.Builder> socketConfigCustomizer = new TestCustomizer<>();
58-
TestCustomizer<RequestConfig.Builder> defaultRequestConfigManagerCustomizer = new TestCustomizer<>();
58+
TestCustomizer<RequestConfig.Builder> defaultRequestConfigCustomizer = new TestCustomizer<>();
5959
ClientHttpRequestFactoryBuilder.httpComponents()
6060
.withHttpClientCustomizer(httpClientCustomizer1)
6161
.withHttpClientCustomizer(httpClientCustomizer2)
6262
.withConnectionManagerCustomizer(connectionManagerCustomizer)
6363
.withSocketConfigCustomizer(socketConfigCustomizer)
64-
.withDefaultRequestConfigManagerCustomizer(defaultRequestConfigManagerCustomizer)
64+
.withDefaultRequestConfigCustomizer(defaultRequestConfigCustomizer)
6565
.build();
6666
httpClientCustomizer1.assertCalled();
6767
httpClientCustomizer2.assertCalled();
6868
connectionManagerCustomizer.assertCalled();
6969
socketConfigCustomizer.assertCalled();
70-
defaultRequestConfigManagerCustomizer.assertCalled();
70+
defaultRequestConfigCustomizer.assertCalled();
7171
}
7272

7373
@Test

0 commit comments

Comments
 (0)