diff options
author | shashikanth <shashikanth.vh@huawei.com> | 2017-09-26 14:56:41 +0530 |
---|---|---|
committer | Shashikanth VH <shashikanth.vh@huawei.com> | 2017-09-26 09:32:18 +0000 |
commit | b720f1b77fe2c96e2afb1bafed5b02724ab50e37 (patch) | |
tree | df285ed1149b89011f34aeed0fb71375ef3f742c | |
parent | bbf1668256784af8268de8ce2b0b84e42c0e18d4 (diff) |
Deleted redundant try catch block
Extract this nested try block into a separate method.
https://sonar.onap.org/component_issues?id=org.onap.ccsdk.sli.northbound%3Accsdk-sli-northbound#resolved=false|severities=MAJOR|rules=squid%3AS1141
Issue-Id: CCSDK-87
Change-Id: I989791d876b5a199f75983ba5137770f80995ef1
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
-rw-r--r-- | ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java index 0664e8283..9723ed4d5 100644 --- a/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java +++ b/ueb-listener/src/main/java/org/onap/ccsdk/sli/northbound/uebclient/SdncUebCallback.java @@ -480,20 +480,13 @@ public class SdncUebCallback implements INotificationCallback { if (transformedFile != null) { try { + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + DocumentBuilder db = dbf.newDocumentBuilder(); - try { - - DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); - DocumentBuilder db = dbf.newDocumentBuilder(); - - spoolDoc = db.parse(transformedFile); - } catch (Exception e) { - LOG.error("Caught exception trying to parse transformed XML file {}", - transformedFile.getAbsolutePath(), e); - } - + spoolDoc = db.parse(transformedFile); } catch (Exception e) { - LOG.error("Caught exception trying to deploy file", e); + LOG.error("Caught exception trying to parse transformed XML file {}", + transformedFile.getAbsolutePath(), e); } } |