.register("https", new SSLConnectionSocketFactory(sslContext, hostnameVerifier)).build();
HttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager(socketFactoryRegistry);
- this.httpClient = HttpClients.custom().setConnectionManager(connManager)
+ this.httpClient = HttpClients.custom().setConnectionManager(connManager) // NOSONAR
.setRedirectStrategy(new LaxRedirectStrategy()).build();
} else {
this.httpClient = HttpClients.createDefault(); // NOSONAR
return result;
}
+ @SuppressWarnings("deprecation")
public void close() {
this.mapCommonHeaders.clear();
+ if (this.httpClient != null) {
+ this.httpClient.getConnectionManager().shutdown();
+ }
}
private HttpEntity getMultipartEntity(HttpInput input) {