aboutsummaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-rest-healthcheck-adapter/appc-rest-healthcheck-adapter-bundle
diff options
context:
space:
mode:
Diffstat (limited to 'appc-adapters/appc-rest-healthcheck-adapter/appc-rest-healthcheck-adapter-bundle')
-rw-r--r--appc-adapters/appc-rest-healthcheck-adapter/appc-rest-healthcheck-adapter-bundle/src/main/java/org/openecomp/appc/adapter/restHealthcheck/impl/RestHealthcheckAdapterImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/appc-adapters/appc-rest-healthcheck-adapter/appc-rest-healthcheck-adapter-bundle/src/main/java/org/openecomp/appc/adapter/restHealthcheck/impl/RestHealthcheckAdapterImpl.java b/appc-adapters/appc-rest-healthcheck-adapter/appc-rest-healthcheck-adapter-bundle/src/main/java/org/openecomp/appc/adapter/restHealthcheck/impl/RestHealthcheckAdapterImpl.java
index 094ef3ebe..6cf2eaf39 100644
--- a/appc-adapters/appc-rest-healthcheck-adapter/appc-rest-healthcheck-adapter-bundle/src/main/java/org/openecomp/appc/adapter/restHealthcheck/impl/RestHealthcheckAdapterImpl.java
+++ b/appc-adapters/appc-rest-healthcheck-adapter/appc-rest-healthcheck-adapter-bundle/src/main/java/org/openecomp/appc/adapter/restHealthcheck/impl/RestHealthcheckAdapterImpl.java
@@ -32,6 +32,7 @@ import java.util.Map;
import java.util.Properties;
import java.util.Set;
import java.util.regex.Pattern;
+import org.apache.http.impl.client.CloseableHttpClient;
import org.openecomp.appc.Constants;
import org.openecomp.appc.adapter.restHealthcheck.RestHealthcheckAdapter;
@@ -258,9 +259,8 @@ public class RestHealthcheckAdapterImpl implements RestHealthcheckAdapter {
RequestContext rc = new RequestContext(ctx);
rc.isAlive();
- try {
+ try(CloseableHttpClient httpClient = HttpClients.createDefault()) {
HttpGet httpGet = new HttpGet(tUrl);
- HttpClient httpClient = HttpClients.createDefault();
HttpResponse response = null;
response = httpClient.execute(httpGet);
int responseCode=response.getStatusLine().getStatusCode();