summaryrefslogtreecommitdiff
path: root/xmerge
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2016-02-06 20:49:16 +0000
committerCaolán McNamara <caolanm@redhat.com>2016-02-06 20:58:44 +0000
commitf5d2efb75720741f76997600662354d432faa6d1 (patch)
treefe2cc906e85388d0650f172d52aef54f05ddae89 /xmerge
parentd9442b1398117ee1710a608a7c30d5e1a073a945 (diff)
coverity#1326525 Resource leak on an exceptional path
Change-Id: I391367ec055372cc82ddb21d19e53041da91b4f6
Diffstat (limited to 'xmerge')
-rw-r--r--xmerge/source/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/xmerge/source/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.java b/xmerge/source/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.java
index 6868675bc625..3c9caf197d98 100644
--- a/xmerge/source/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.java
+++ b/xmerge/source/xmerge/java/org/openoffice/xmerge/test/ConverterInfoList.java
@@ -59,8 +59,11 @@ public class ConverterInfoList {
InputStream is = c.getResourceAsStream(propsFile);
BufferedInputStream bis = new BufferedInputStream(is);
Properties props = new Properties();
- props.load(bis);
- bis.close();
+ try {
+ props.load(bis);
+ } finally {
+ bis.close();
+ }
int i = 1;
String jarFileName = "";
@@ -85,4 +88,4 @@ public class ConverterInfoList {
return jars.iterator();
}
-} \ No newline at end of file
+}