diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/src/test/java/org/aspectj/testing/FileSpec.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/testing/src/test/java/org/aspectj/testing/FileSpec.java b/testing/src/test/java/org/aspectj/testing/FileSpec.java index 2164f38f1..cd11e4026 100644 --- a/testing/src/test/java/org/aspectj/testing/FileSpec.java +++ b/testing/src/test/java/org/aspectj/testing/FileSpec.java @@ -55,7 +55,10 @@ public class FileSpec implements ITestStep { if (toDelete != null) { File targetForDeletion = new File(sandbox, toDelete); if (targetForDeletion.isFile()) { - targetForDeletion.delete(); + boolean b = targetForDeletion.delete(); + if (!b) { + throw new IllegalStateException("Failed to delete "+targetForDeletion); + } } else { recursiveDelete(targetForDeletion); } |