summaryrefslogtreecommitdiffstats
path: root/ecomp-sdk/epsdk-analytics/src
diff options
context:
space:
mode:
authorParshad Patel <pars.patel@samsung.com>2018-11-01 14:42:43 +0900
committerParshad Patel <pars.patel@samsung.com>2018-11-01 14:50:28 +0900
commitacd4d7499c8ffd7f0a455720b084463f126111ba (patch)
treeba17f88e58dca546f062d2fd7216bee249099eaf /ecomp-sdk/epsdk-analytics/src
parent97e29f1fe153f283133c560642a9c5fca16c87a0 (diff)
Fix sonar blocker issue in epsdk-analytics
Fix Remove this throw statement from this finally block sonar issue. Issue-ID: PORTAL-342 Change-Id: Ibe3b4f0cf86dede3cec1355e2a4b455fe4d44651 Signed-off-by: Parshad Patel <pars.patel@samsung.com>
Diffstat (limited to 'ecomp-sdk/epsdk-analytics/src')
-rw-r--r--ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/AntBuild.java13
1 files changed, 2 insertions, 11 deletions
diff --git a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/AntBuild.java b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/AntBuild.java
index aa01b184..b416f779 100644
--- a/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/AntBuild.java
+++ b/ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/AntBuild.java
@@ -57,9 +57,8 @@ public class AntBuild {
}
public static void readManifest() {
- JarFile jar = null;
- try {
- jar = new JarFile("./raptor_fusion.jar");
+ try(JarFile jar = new JarFile("./raptor_fusion.jar")){
+
Manifest manifest = jar.getManifest();
Attributes attribs = manifest.getMainAttributes();
@@ -81,14 +80,6 @@ public class AntBuild {
} catch (IOException e) {
System.err.println("Cannot read jar-file manifest: "
+ e.getMessage());
- } finally {
- if (jar != null) {
- try {
- jar.close();
- } catch (IOException e) {
- throw new RuntimeException("Failed to close jar '");
- }
- }
}
}
} \ No newline at end of file