aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2021-04-09 18:16:28 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2021-04-09 18:16:28 +0700
commita618e29cf3449adc38074a020adb270ca9865138 (patch)
treecdeb36d7bc888293d2b6dceade267e05d58fbe21 /weaver
parent5e1551b46f734a0ee877119eef1de652edf6f77c (diff)
downloadaspectj-a618e29cf3449adc38074a020adb270ca9865138.tar.gz
aspectj-a618e29cf3449adc38074a020adb270ca9865138.zip
Make sure to clean up temp-dirs in 'weaver' module
Maven Clean now deletes '' directories if it finds any. Furthermore, AsynchronousFileCacheBackingTestSupport now not just deletes directory contents but also removes the empty corresponding directories afterwards. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/test/java/org/aspectj/weaver/tools/cache/AsynchronousFileCacheBackingTestSupport.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/weaver/src/test/java/org/aspectj/weaver/tools/cache/AsynchronousFileCacheBackingTestSupport.java b/weaver/src/test/java/org/aspectj/weaver/tools/cache/AsynchronousFileCacheBackingTestSupport.java
index a6445057b..e8b0b4ecd 100644
--- a/weaver/src/test/java/org/aspectj/weaver/tools/cache/AsynchronousFileCacheBackingTestSupport.java
+++ b/weaver/src/test/java/org/aspectj/weaver/tools/cache/AsynchronousFileCacheBackingTestSupport.java
@@ -59,14 +59,17 @@ public abstract class AsynchronousFileCacheBackingTestSupport
protected void cleanupCache() {
if (indexFile != null) {
if (FileUtil.deleteContents(indexFile) > 0) {
- System.out.println("Deleted " + indexFile);
+ System.out.println("Deleted index file: " + indexFile);
}
indexFile = null;
}
if (cacheDir != null) {
if (FileUtil.deleteContents(cacheDir) > 0) {
- System.out.println("Deleted " + cacheDir);
+ System.out.println("Deleted cache directory content: " + cacheDir);
+ }
+ if (cacheDir.delete()) {
+ System.out.println("Deleted cache directory: " + cacheDir);
}
cacheDir = null;
}