Author: jglick
Date: Fri Dec 23 16:02:47 2011
New Revision: 1222711
URL: http://svn.apache.org/viewvc?rev=1222711&view=rev
Log:
Should not throw an error if the temp dir does not yet exist.
Modified:
ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregatorTest.java
Modified:
ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregatorTest.java
URL:
http://svn.apache.org/viewvc/ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregatorTest.java?rev=1222711&r1=1222710&r2=1222711&view=diff
==============================================================================
---
ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregatorTest.java
(original)
+++
ant/core/trunk/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregatorTest.java
Fri Dec 23 16:02:47 2011
@@ -41,7 +41,9 @@ public class XMLResultAggregatorTest ext
return;
}
final File d = new File(System.getProperty("java.io.tmpdir"),
"XMLResultAggregatorTest");
- new Delete() {{removeDir(d);}}; // is there no utility method for this?
+ if (d.exists()) {
+ new Delete() {{removeDir(d);}}; // is there no utility method for
this?
+ }
assertTrue(d.getAbsolutePath(), d.mkdir());
File xml = new File(d, "x.xml");
PrintWriter pw = new PrintWriter(new FileOutputStream(xml));