aboutsummaryrefslogtreecommitdiffstats
path: root/appc-adapters/appc-rest-healthcheck-adapter
diff options
context:
space:
mode:
authoramshegokar <as00500801@techmahindra.com>2017-09-20 14:18:03 +0530
committerSkip Wonnell <skip@att.com>2017-09-20 08:20:34 -0500
commit811db4c39abb769a14c9b5ab1093b764c8b42a50 (patch)
tree24af7a758f974d35d326c4b80c8a062ef51ec22f /appc-adapters/appc-rest-healthcheck-adapter
parentb59ab6b65a4f81464a970e579107d0828f78aadc (diff)
Sonar Blocker
For rest healthcheck Adapter-bundle Change-Id: Ic499d7af6c90cd692e8362ba4f7d2f5d62d48422 Issue-ID: APPC-216 Signed-off-by: Shubhada Ramkrishna Vaze <SV00449682@TechMahindra.com> Signed-off-by: Skip Wonnell <skip@att.com>
Diffstat (limited to 'appc-adapters/appc-rest-healthcheck-adapter')
-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();