]> source.dussan.org Git - aspectj.git/commitdiff
awful downcast for AjcTaskCompileCommand - should be remedied after 1.1 with ICommand...
authorwisberg <wisberg>
Sat, 24 May 2003 09:27:04 +0000 (09:27 +0000)
committerwisberg <wisberg>
Sat, 24 May 2003 09:27:04 +0000 (09:27 +0000)
testing/src/org/aspectj/testing/harness/bridge/Sandbox.java

index 35350ef85136f3e628b5c8e3f08de79563dd506d..0e1fe9737abd8a658cb8ddf8ffe424b3170be048 100644 (file)
@@ -18,6 +18,7 @@ import java.util.ArrayList;
 import org.aspectj.bridge.ICommand;
 import org.aspectj.bridge.IMessage;
 import org.aspectj.bridge.IMessageHandler;
+import org.aspectj.testing.taskdefs.AjcTaskCompileCommand;
 import org.aspectj.testing.util.Diffs;
 import org.aspectj.util.FileUtil;
 import org.aspectj.util.LangUtil;
@@ -186,7 +187,10 @@ public class Sandbox {
     /** When test is completed, clear the compiler to avoid memory leaks */
     void clearCommand(AjcTest caller) {
         LangUtil.throwIaxIfNull(caller, "caller"); 
-        if (null != command) {
+        if (null != command) { // need to add ICommand.quit()
+            if (command instanceof AjcTaskCompileCommand) { // XXX urk!
+                ((AjcTaskCompileCommand) command).quit();
+            }
             command = null;
         }
         // also try to clear sandbox/filesystem.