diff options
Diffstat (limited to 'ecomp-sdk')
-rw-r--r-- | ecomp-sdk/epsdk-analytics/src/main/java/org/onap/portalsdk/analytics/system/fusion/AntBuild.java | 13 |
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 |