Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2014-01-20 08:31:48 -0500
committerMarkus Tiede2014-01-20 08:31:48 -0500
commit7152949c7e0562cdad0609fa137c6239f536cb67 (patch)
treea069fcdba828b640e405b0ece58c0883e3dfdb69 /org.eclipse.jubula.autagent
parente1dc41b1c678f5ef1dd6d56157ec17a4a69fe01d (diff)
downloadorg.eclipse.jubula.core-7152949c7e0562cdad0609fa137c6239f536cb67.tar.gz
org.eclipse.jubula.core-7152949c7e0562cdad0609fa137c6239f536cb67.tar.xz
org.eclipse.jubula.core-7152949c7e0562cdad0609fa137c6239f536cb67.zip
Non-sprint task - fix for potential resource leak.
Diffstat (limited to 'org.eclipse.jubula.autagent')
-rw-r--r--org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAut.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAut.java b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAut.java
index ff9599224..73f0b2d65 100644
--- a/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAut.java
+++ b/org.eclipse.jubula.autagent/src/org/eclipse/jubula/autagent/commands/AbstractStartJavaAut.java
@@ -208,8 +208,7 @@ public abstract class AbstractStartJavaAut extends AbstractStartToolkitAut {
return null;
}
String attribute = null;
- try {
- JarFile jar = new JarFile(jarFile);
+ try (JarFile jar = new JarFile(jarFile)) {
Manifest manifest = jar.getManifest();
if (manifest != null) {
attribute = manifest.getMainAttributes().getValue(

Back to the top