Skip to content

Commit 2e4566b

Browse files
committed
Polish
1 parent 992c905 commit 2e4566b

File tree

3 files changed

+6
-18
lines changed

3 files changed

+6
-18
lines changed

module/spring-boot-http-client/src/main/java/org/springframework/boot/http/client/HttpClientSettings.java

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import org.springframework.boot.ssl.SslBundle;
2424

2525
/**
26-
* Settings that can be applied when creating a imperative or reactive HTTP client.
26+
* Settings that can be applied when creating an imperative or reactive HTTP client.
2727
*
2828
* @param redirects the follow redirect strategy to use or null to redirect whenever the
2929
* underlying library allows it
@@ -38,14 +38,6 @@ public record HttpClientSettings(@Nullable HttpRedirects redirects, @Nullable Du
3838

3939
private static final HttpClientSettings defaults = new HttpClientSettings(null, null, null, null);
4040

41-
public HttpClientSettings(@Nullable HttpRedirects redirects, @Nullable Duration connectTimeout,
42-
@Nullable Duration readTimeout, @Nullable SslBundle sslBundle) {
43-
this.redirects = redirects;
44-
this.connectTimeout = connectTimeout;
45-
this.readTimeout = readTimeout;
46-
this.sslBundle = sslBundle;
47-
}
48-
4941
/**
5042
* Return a new {@link HttpClientSettings} instance with an updated connect timeout
5143
* setting.

module/spring-boot-http-client/src/main/java/org/springframework/boot/http/client/autoconfigure/HttpClientAutoConfiguration.java

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,12 @@
3636
@EnableConfigurationProperties(HttpClientsProperties.class)
3737
public final class HttpClientAutoConfiguration {
3838

39-
private final HttpClientSettingsPropertyMapper propertyMapper;
40-
41-
HttpClientAutoConfiguration(ObjectProvider<SslBundles> sslBundles) {
42-
this.propertyMapper = new HttpClientSettingsPropertyMapper(sslBundles.getIfAvailable(), null);
43-
}
44-
4539
@Bean
4640
@ConditionalOnMissingBean
47-
HttpClientSettings httpClientSettings(HttpClientsProperties properties) {
48-
return this.propertyMapper.map(properties);
41+
HttpClientSettings httpClientSettings(ObjectProvider<SslBundles> sslBundles, HttpClientsProperties properties) {
42+
HttpClientSettingsPropertyMapper propertyMapper = new HttpClientSettingsPropertyMapper(
43+
sslBundles.getIfAvailable(), null);
44+
return propertyMapper.map(properties);
4945
}
5046

5147
}

module/spring-boot-http-client/src/main/java/org/springframework/boot/http/client/autoconfigure/HttpClientSettingsPropertyMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public HttpClientSettings map(@Nullable HttpClientSettingsProperties properties)
5757
return settings.orElse(this.settings);
5858
}
5959

60-
private @Nullable SslBundle getSslBundle(String name) {
60+
private SslBundle getSslBundle(String name) {
6161
Assert.state(this.sslBundles != null, "No 'sslBundles' available");
6262
return this.sslBundles.getBundle(name);
6363
}

0 commit comments

Comments
 (0)