diff options
author | ezhil <ezhrajam@in.ibm.com> | 2020-04-24 18:04:04 +0530 |
---|---|---|
committer | James Forsyth <jf2512@att.com> | 2020-06-03 15:28:08 +0000 |
commit | dc9232b50a286b08d775ce6471697b53d9b483ce (patch) | |
tree | ea29bbb68807ddcf006dd8ce40fafc934bc14cc1 | |
parent | a81695efd81cc14d53ad94c5539101c641feb539 (diff) |
Critical Sonar bug fix
Sonar critical bug fix in HttpsAuthClient
Issue-ID: AAF-1120
Change-Id: I840d7d4ac56767fd56f687f850bec879a4edeca9
Signed-off-by: ezhil <ezhrajam@in.ibm.com>
-rw-r--r-- | aai-core/src/main/java/org/onap/aai/util/HttpsAuthClient.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/aai-core/src/main/java/org/onap/aai/util/HttpsAuthClient.java b/aai-core/src/main/java/org/onap/aai/util/HttpsAuthClient.java index c2bfabf4..84935cdb 100644 --- a/aai-core/src/main/java/org/onap/aai/util/HttpsAuthClient.java +++ b/aai-core/src/main/java/org/onap/aai/util/HttpsAuthClient.java @@ -93,9 +93,9 @@ public class HttpsAuthClient { ctx = SSLContext.getInstance("TLSv1.2"); KeyManagerFactory kmf = null; - try { + + try(FileInputStream fin = new FileInputStream(keystorePath)) { kmf = KeyManagerFactory.getInstance("SunX509"); - FileInputStream fin = new FileInputStream(keystorePath); KeyStore ks = KeyStore.getInstance("PKCS12"); char[] pwd = keystorePassword.toCharArray(); ks.load(fin, pwd); |