diff options
author | Parshad Patel <pars.patel@samsung.com> | 2018-07-12 18:27:27 +0900 |
---|---|---|
committer | Parshad Patel <pars.patel@samsung.com> | 2018-07-12 18:32:47 +0900 |
commit | 880929c1d62cc06e2a2c24c9426d3b4c52cb0f56 (patch) | |
tree | f14abf2485c0efb55c5c7523ce1fe8ec5132939e /aai-service/provider/src/main/java | |
parent | f7c04ba242c8cead90536dc27a4620593304189a (diff) |
Fix sonar issue in AAIClientRESTExecutor
FileInputStream closed
Issue-ID: CCSDK-332
Change-Id: I889e6f57e50eb3256b74c7f5342dea872ea3aa6a
Signed-off-by: Parshad Patel <pars.patel@samsung.com>
Diffstat (limited to 'aai-service/provider/src/main/java')
-rwxr-xr-x | aai-service/provider/src/main/java/org/onap/ccsdk/sli/adaptors/aai/AAIClientRESTExecutor.java | 3 |
1 files changed, 1 insertions, 2 deletions
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); |