summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-05-03 15:18:08 +0200
committerNoel Grandin <noel@peralex.com>2013-05-06 11:45:56 +0200
commit402c8f5f1efd053cc69556d63999955b3af4f41d (patch)
tree6f5dd611fa39962511feeaf1802d3776217f84fe /qadevOOo
parent7cba598a7ddcf02771ed31c8d8fce6f7e02ef715 (diff)
Java cleanup, close file handles when done with them
Change-Id: I79e6e0b8f53ae6f232c34aa8e833853d2ec24cf0
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/base/java_fat.java45
1 files changed, 22 insertions, 23 deletions
diff --git a/qadevOOo/runner/base/java_fat.java b/qadevOOo/runner/base/java_fat.java
index 1b95f28ff582..031474fddd21 100644
--- a/qadevOOo/runner/base/java_fat.java
+++ b/qadevOOo/runner/base/java_fat.java
@@ -511,40 +511,39 @@ public class java_fat implements TestBase
return entryList;
}
- while (line != null)
+ try
{
- try
+ while (line != null)
{
- if (!line.startsWith("#") && (line.length() > 1))
+ try
{
- entryList.add(line.trim());
- }
+ if (!line.startsWith("#") && (line.length() > 1))
+ {
+ entryList.add(line.trim());
+ }
- line = exclusion.readLine();
- }
- catch (java.io.IOException ioe)
- {
- if (debug)
- {
- System.out.println("Exception while reading exclusion list");
+ line = exclusion.readLine();
}
+ catch (java.io.IOException ioe)
+ {
+ if (debug)
+ {
+ System.out.println("Exception while reading exclusion list");
+ }
- return entryList;
+ return entryList;
+ }
}
}
-
- try
- {
- exclusion.close();
- }
- catch (java.io.IOException ioe)
+ finally
{
- if (debug)
+ try
+ {
+ exclusion.close();
+ }
+ catch (java.io.IOException ioe)
{
- System.out.println("Couldn't close file " + url);
}
-
- return entryList;
}
return entryList;