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>
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 094ef3e..6cf2eaf 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.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 @@
 		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();