Use new JettyClientHttpConnector constructor

Simplify `ClientHttpConnectorConfiguration`by using the recently
introduced `JettyClientHttpConnector` constructor.

See gh-17015
This commit is contained in:
Issam El-atif
2019-05-29 23:19:55 +02:00
committed by Phillip Webb
parent 898a903d2f
commit 4ac1407af1

View File

@@ -78,10 +78,7 @@ class ClientHttpConnectorConfiguration {
JettyResourceFactory jettyResourceFactory) {
SslContextFactory sslContextFactory = new SslContextFactory.Client();
HttpClient httpClient = new HttpClient(sslContextFactory);
httpClient.setExecutor(jettyResourceFactory.getExecutor());
httpClient.setByteBufferPool(jettyResourceFactory.getByteBufferPool());
httpClient.setScheduler(jettyResourceFactory.getScheduler());
return new JettyClientHttpConnector(httpClient);
return new JettyClientHttpConnector(httpClient, jettyResourceFactory);
}
}