From 4495b959d99b0e011cdaae291758196140bd4819 Mon Sep 17 00:00:00 2001 From: "Jesse N. Glick" Date: Fri, 23 Dec 2011 16:02:47 +0000 Subject: [PATCH] Should not throw an error if the temp dir does not yet exist. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@1222711 13f79535-47bb-0310-9956-ffa450edef68 --- .../ant/taskdefs/optional/junit/XMLResultAggregatorTest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregatorTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregatorTest.java index a1bc4256d..ba4504d11 100644 --- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregatorTest.java +++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregatorTest.java @@ -41,7 +41,9 @@ public class XMLResultAggregatorTest extends TestCase { 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));