You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2008/09/01 15:43:19 UTC

svn commit: r690970 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java

Author: bodewig
Date: Mon Sep  1 06:43:18 2008
New Revision: 690970

URL: http://svn.apache.org/viewvc?rev=690970&view=rev
Log:
close stream so that unit tests can delete the output directory.

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

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java?rev=690970&r1=690969&r2=690970&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java Mon Sep  1 06:43:18 2008
@@ -200,6 +200,10 @@
      * {@inheritDoc}
      */
     public void setOutput(OutputStream out) {
+        // unused, close output file so it can be deleted before the VM exits
+        if (out != System.out) {
+            FileUtils.close(out);
+        }
     }
 
     /**