diff options
author | Gaurav Agrawal <gaurav.agrawal@huawei.com> | 2017-09-08 19:28:18 +0530 |
---|---|---|
committer | Gaurav Agrawal <gaurav.agrawal@huawei.com> | 2017-09-08 19:28:18 +0530 |
commit | ea0aabe54bc7b5d609b587e87ce85765f73fecbc (patch) | |
tree | 3957a3e83ae97a142a4b501df1f08f5966c47513 /ueb-listener | |
parent | 8881ebb497e9f35e5ea9d19923fd926db56e8f12 (diff) |
Fix few Blocker sonar issues
Fix few Blocker sonar issues in CCSDK SLI Northbound
https://sonar.onap.org/component_issues/index?id=org.onap.ccsdk.sli.northbound%3Accsdk-sli-northbound#resolved=false|severities=BLOCKER
Change-Id: I8a2f2e9f3bc5bc5c007076e42f77fbf5da1304ac
Issue-Id: CCSDK-67
Signed-off-by: Gaurav Agrawal <gaurav.agrawal@huawei.com>
Diffstat (limited to 'ueb-listener')
-rw-r--r-- | ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java index 4c08949c0..dd9437ce9 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncArtifactMap.java @@ -87,10 +87,7 @@ public class SdncArtifactMap { if (mapFile.exists() && mapFile.canRead()) { - BufferedReader rdr = null; - try { - - rdr = new BufferedReader(new FileReader(mapFile)); + try (BufferedReader rdr = new BufferedReader(new FileReader(mapFile))) { for (String ln ; (ln = rdr.readLine()) != null ; ) { String[] lnFields = ln.split(","); @@ -107,14 +104,6 @@ public class SdncArtifactMap { } catch (Exception e) { LOG.error("Caught exception reading artifact map", e); return; - } finally { - if (rdr != null) { - try { - rdr.close(); - } catch (IOException e) { - - } - } } } } |