summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qadevOOo/runner/helper/CfgParser.java15
1 files changed, 11 insertions, 4 deletions
diff --git a/qadevOOo/runner/helper/CfgParser.java b/qadevOOo/runner/helper/CfgParser.java
index b65697e9b6c8..a93e725fd99b 100644
--- a/qadevOOo/runner/helper/CfgParser.java
+++ b/qadevOOo/runner/helper/CfgParser.java
@@ -91,9 +91,12 @@ public class CfgParser
try
{
FileInputStream propFile = new FileInputStream(name);
- prop.load(propFile);
- System.out.println("Parsing properties from " + name);
- propFile.close();
+ try {
+ prop.load(propFile);
+ System.out.println("Parsing properties from " + name);
+ } finally {
+ propFile.close();
+ }
}
catch (Exception e)
{
@@ -105,7 +108,11 @@ public class CfgParser
System.out.println("Parsing properties from " + name);
java.net.URLConnection connection = url.openConnection();
java.io.InputStream in = connection.getInputStream();
- prop.load(in);
+ try {
+ prop.load(in);
+ } finally {
+ in.close();
+ }
}
}
catch (Exception ex)