diff options
author | William Reehil <william.reehil@att.com> | 2020-07-06 17:57:54 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-07-06 17:57:54 +0000 |
commit | 6a7dd87128b369c1bea97bf05f16ca1873f1d8e4 (patch) | |
tree | ba54715eb4ee59aae4984693780276e94b7c9369 | |
parent | 264338ad578277ecc88dddf413e7be3f6e4f0232 (diff) | |
parent | dc9232b50a286b08d775ce6471697b53d9b483ce (diff) |
Merge "Critical Sonar bug fix"
-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); |