ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgl...@apache.org
Subject svn commit: r961380 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java
Date Wed, 07 Jul 2010 13:59:38 GMT
Author: jglick
Date: Wed Jul  7 13:59:37 2010
New Revision: 961380

URL: http://svn.apache.org/viewvc?rev=961380&view=rev
Log:
JUnitTaskTest.testFailureRecorder failure (on JDK 1.4) after rev 960931.

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=961380&r1=961379&r2=961380&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
Wed Jul  7 13:59:37 2010
@@ -249,7 +249,7 @@ public class FailureRecorder extends Pro
             File sourceFile = new File((getLocationName() + ".java"));
             verbose("Write collector class to '" + sourceFile.getAbsolutePath() + "'");
 
-            if (!sourceFile.delete()) {
+            if (sourceFile.exists() && !sourceFile.delete()) {
                 throw new IOException("could not delete " + sourceFile);
             }
             writer = new BufferedWriter(new FileWriter(sourceFile));



Mime
View raw message