From 880929c1d62cc06e2a2c24c9426d3b4c52cb0f56 Mon Sep 17 00:00:00 2001 From: Parshad Patel Date: Thu, 12 Jul 2018 18:27:27 +0900 Subject: Fix sonar issue in AAIClientRESTExecutor FileInputStream closed Issue-ID: CCSDK-332 Change-Id: I889e6f57e50eb3256b74c7f5342dea872ea3aa6a Signed-off-by: Parshad Patel --- .../java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'aai-service/provider/src') diff --git a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java index b6eacb7a..aa134cb4 100755 --- a/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java +++ b/aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java @@ -138,11 +138,10 @@ public class AAIClientRESTExecutor implements AAIExecutorInterface { ctx = SSLContext.getInstance("TLS"); KeyManagerFactory kmf = null; - try { + try (FileInputStream fin = new FileInputStream(keystorePath)){ String storeType = "PKCS12"; String def = KeyStore.getDefaultType(); kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm()); - FileInputStream fin = new FileInputStream(keystorePath); String extension = keystorePath.substring(keystorePath.lastIndexOf(".") + 1); -- cgit 1.2.3-korg