Skip to content

Commit 31cab61

Browse files
committed
Simplify SslContextFactory usage when configuring JettyClientHttpConnector
This commit simplify SslContextFactory usage when configuring JettyClientHttpConnector since it provides a constructor that takes a HttpClient and a JettyResourceFactory as parameters. Closes gh-16994
1 parent 2a66daf commit 31cab61

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/function/client/ClientHttpConnectorConfiguration.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,7 @@ public JettyClientHttpConnector jettyClientHttpConnector(
7878
JettyResourceFactory jettyResourceFactory) {
7979
SslContextFactory sslContextFactory = new SslContextFactory.Client();
8080
HttpClient httpClient = new HttpClient(sslContextFactory);
81-
httpClient.setExecutor(jettyResourceFactory.getExecutor());
82-
httpClient.setByteBufferPool(jettyResourceFactory.getByteBufferPool());
83-
httpClient.setScheduler(jettyResourceFactory.getScheduler());
84-
return new JettyClientHttpConnector(httpClient);
81+
return new JettyClientHttpConnector(httpClient, jettyResourceFactory);
8582
}
8683

8784
}

0 commit comments

Comments
 (0)