]> source.dussan.org Git - aspectj.git/commitdiff
fix for Bugzilla Bug 43714
authoracolyer <acolyer>
Tue, 16 Mar 2004 14:10:31 +0000 (14:10 +0000)
committeracolyer <acolyer>
Tue, 16 Mar 2004 14:10:31 +0000 (14:10 +0000)
  weaving from an input jar into that same jar.
fully qualify outjar location in sandbox, and don't specify both -d and outjar.

testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java

index 76d3401261c0224e517a0e6706aab21e94b21faa..e50dd8174ad2ed276a1279028b84436fdabd78cb 100644 (file)
@@ -338,7 +338,7 @@ public class CompilerRun implements IAjcRun {
         }
         if (spec.outjar != null) {
                arguments.add("-outjar");
-               arguments.add(spec.outjar);
+               arguments.add(new File(sandbox.classesDir,spec.outjar).getPath());
         }
         if (!LangUtil.isEmpty(extdirFiles)) {
             arguments.add("-extdirs");
@@ -438,18 +438,19 @@ public class CompilerRun implements IAjcRun {
         ArrayList argList = new ArrayList();
         final Spec.TestSetup setupResult = spec.testSetup;
         try {
-            argList.add("-d");
-            String outputDirPath = sandbox.classesDir.getAbsolutePath();
-            try { // worth it to try for canonical?
-                outputDirPath = sandbox.classesDir.getCanonicalPath();
-            } catch (IOException e) {
-                MessageUtil.abort(
-                    status,
-                    "canonical " + sandbox.classesDir,
-                    e);
-            }
-            argList.add(outputDirPath);
-
+               if (spec.outjar == null) {
+                   argList.add("-d");
+                   String outputDirPath = sandbox.classesDir.getAbsolutePath();
+                   try { // worth it to try for canonical?
+                       outputDirPath = sandbox.classesDir.getCanonicalPath();
+                   } catch (IOException e) {
+                       MessageUtil.abort(
+                           status,
+                           "canonical " + sandbox.classesDir,
+                           e);
+                   }
+                   argList.add(outputDirPath);
+               }
             String path = sandbox.classpathToString(this);
             if (!LangUtil.isEmpty(path)) {
                 argList.add("-classpath");