ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r448061 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
Date Wed, 20 Sep 2006 04:37:56 GMT
Author: antoine
Date: Tue Sep 19 21:37:55 2006
New Revision: 448061

URL: http://svn.apache.org/viewvc?view=rev&rev=448061
Log:
close reader of vmwatcher

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java?view=diff&rev=448061&r1=448060&r2=448061
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java Tue
Sep 19 21:37:55 2006
@@ -992,12 +992,19 @@
             throw new BuildException("Process fork failed.", e, getLocation());
         } finally {
             String vmCrashString = "unknown";
+            BufferedReader br = null;
             try {
-                BufferedReader br = new BufferedReader(new FileReader(vmWatcher));
+                br = new BufferedReader(new FileReader(vmWatcher));
                 vmCrashString = br.readLine();
             } catch (Exception e) {
                 e.printStackTrace();
                 // ignored.
+            } finally {
+                try {
+                    br.close();
+                } catch (IOException ioe) {
+                    // nothing
+                }
             }
             if (watchdog != null && watchdog.killedProcess()) {
                 result.timedOut = true;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message