summaryrefslogtreecommitdiffstats
path: root/aai-rest/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'aai-rest/src/main')
-rw-r--r--aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java2
-rw-r--r--aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java2
-rw-r--r--aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java2
3 files changed, 3 insertions, 3 deletions
diff --git a/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java b/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java
index b5a0101d..31dd0c92 100644
--- a/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java
+++ b/aai-rest/src/main/java/org/onap/aai/restclient/NoAuthRestClient.java
@@ -41,7 +41,7 @@ public abstract class NoAuthRestClient extends RestClient {
public void init() throws Exception {
HttpClient client = HttpClients.createDefault();
restTemplate =
- new RestTemplateBuilder().requestFactory(new HttpComponentsClientHttpRequestFactory(client)).build();
+ new RestTemplateBuilder().requestFactory(() -> new HttpComponentsClientHttpRequestFactory(client)).build();
restTemplate.setErrorHandler(new RestClientResponseErrorHandler());
}
diff --git a/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java b/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java
index 30545dba..aa672575 100644
--- a/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java
+++ b/aai-rest/src/main/java/org/onap/aai/restclient/OneWaySSLRestClient.java
@@ -59,7 +59,7 @@ public abstract class OneWaySSLRestClient extends RestClient {
HttpClients.custom().setSSLContext(sslContext).setSSLHostnameVerifier((s, sslSession) -> true).build();
restTemplate =
- new RestTemplateBuilder().requestFactory(new HttpComponentsClientHttpRequestFactory(client)).build();
+ new RestTemplateBuilder().requestFactory(() -> new HttpComponentsClientHttpRequestFactory(client)).build();
restTemplate.setErrorHandler(new RestClientResponseErrorHandler());
diff --git a/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java b/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java
index a69977ff..58f2106c 100644
--- a/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java
+++ b/aai-rest/src/main/java/org/onap/aai/restclient/TwoWaySSLRestClient.java
@@ -62,7 +62,7 @@ public abstract class TwoWaySSLRestClient extends RestClient {
HttpClients.custom().setSSLContext(sslContext).setSSLHostnameVerifier((s, sslSession) -> true).build();
restTemplate =
- new RestTemplateBuilder().requestFactory(new HttpComponentsClientHttpRequestFactory(client)).build();
+ new RestTemplateBuilder().requestFactory(() -> new HttpComponentsClientHttpRequestFactory(client)).build();
restTemplate.setErrorHandler(new RestClientResponseErrorHandler());