diff options
author | wisberg <wisberg> | 2005-01-27 02:16:21 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2005-01-27 02:16:21 +0000 |
commit | 9b4532c41ab85510f26548fc35c69ff6e9537cf1 (patch) | |
tree | 95a6f925470b76390305297c3c11b8d43cad9bd3 /testing/src/org/aspectj | |
parent | 102eaace8f3c59750c68554a2867ea7d9cee12f8 (diff) | |
download | aspectj-9b4532c41ab85510f26548fc35c69ff6e9537cf1.tar.gz aspectj-9b4532c41ab85510f26548fc35c69ff6e9537cf1.zip |
Permit outjars to be used as injars in subsequent compile runs
Diffstat (limited to 'testing/src/org/aspectj')
-rw-r--r-- | testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java b/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java index ba25fb4da..0ab12ebb3 100644 --- a/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java +++ b/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java @@ -179,8 +179,9 @@ public class CompilerRun implements IAjcRun { // validate readable for sources if (!spec.badInput) { if (!validator.canRead(testBaseSrcDir, srcPaths, "sources") - || !validator.canRead(testBaseSrcDir, injarPaths, "injars") - || !validator.canRead(testBaseSrcDir, inpathPaths, "inpaths") + // moved validation of inpathPaths below due to ambiguous base dir + //|| !validator.canRead(testBaseSrcDir, injarPaths, "injars") + //|| !validator.canRead(testBaseSrcDir, inpathPaths, "inpaths") || !validator.canRead( testBaseSrcDir, spec.argfiles, @@ -231,7 +232,24 @@ public class CompilerRun implements IAjcRun { FileUtil.getBaseDirFiles(testBaseSrcDir, spec.classpath); final File[] xlintFiles = (null == spec.xlintfile ? new File[0] : FileUtil.getBaseDirFiles(testBaseSrcDir, new String[] {spec.xlintfile})); - + + // injars might be outjars in the classes dir... + for (int i = 0; i < injarFiles.length; i++) { + if (!injarFiles[i].exists()) { + injarFiles[i] = new File(sandbox.classesDir, injarPaths[i]); + } + } + for (int i = 0; i < inpathFiles.length; i++) { + if (!inpathFiles[i].exists()) { + inpathFiles[i] = new File(sandbox.classesDir, inpathPaths[i]); + } + } + // moved after solving any injars that were outjars + if (!validator.canRead(injarFiles, "injars") + || !validator.canRead(injarFiles, "injars")) { + return false; + } + // hmm - duplicates validation above, verifying getBaseDirFiles? if (!spec.badInput) { if (!validator.canRead(argFiles, "argFiles") |