diff options
author | Andy Clement <aclement@pivotal.io> | 2019-02-08 15:07:23 -0800 |
---|---|---|
committer | Andy Clement <aclement@pivotal.io> | 2019-02-08 15:07:23 -0800 |
commit | ce1533d8493277d1111005e890f076ef90b32eab (patch) | |
tree | 33a21d3dae587a98245d784525d74a284b7dafab /weaver | |
parent | 635f0ed47ffe11e93d96e4d24e4411eedfa1ddc9 (diff) | |
download | aspectj-ce1533d8493277d1111005e890f076ef90b32eab.tar.gz aspectj-ce1533d8493277d1111005e890f076ef90b32eab.zip |
Fix getSpecFile() to work with URLs and adjust installer unpacker
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/test/java/org/aspectj/weaver/tools/cache/AbstractCacheBackingTestSupport.java | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/weaver/src/test/java/org/aspectj/weaver/tools/cache/AbstractCacheBackingTestSupport.java b/weaver/src/test/java/org/aspectj/weaver/tools/cache/AbstractCacheBackingTestSupport.java index 5ad69a91d..d66626f5c 100644 --- a/weaver/src/test/java/org/aspectj/weaver/tools/cache/AbstractCacheBackingTestSupport.java +++ b/weaver/src/test/java/org/aspectj/weaver/tools/cache/AbstractCacheBackingTestSupport.java @@ -98,9 +98,19 @@ public abstract class AbstractCacheBackingTestSupport extends TestCase { protected File detectTargetFolder () throws IllegalStateException { synchronized(TEMP_SUBFOLDER_NAME) { if (targetFolder == null) { - if ((targetFolder=detectTargetFolder(getClass())) == null) { - throw new IllegalStateException("Failed to detect target folder"); - } + try { + File targetFolder = File.createTempFile("ajc", "TmpCacheDir"); + targetFolder.delete(); + targetFolder.mkdirs(); + } catch (IOException e) { + throw new IllegalStateException("Unable to create cache dir",e); + } + + +// if ((targetFolder=detectTargetFolder(getClass())) == null) { +// +//// throw new IllegalStateException("Failed to detect target folder"); +// } } } |