From: wisberg Date: Sat, 24 May 2003 09:27:04 +0000 (+0000) Subject: awful downcast for AjcTaskCompileCommand - should be remedied after 1.1 with ICommand... X-Git-Tag: V1_1_0~83 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=7e3b3f9016cb0ceb3a15bb3fab1669e34b1a0ef1;p=aspectj.git awful downcast for AjcTaskCompileCommand - should be remedied after 1.1 with ICommand interface extension --- diff --git a/testing/src/org/aspectj/testing/harness/bridge/Sandbox.java b/testing/src/org/aspectj/testing/harness/bridge/Sandbox.java index 35350ef85..0e1fe9737 100644 --- a/testing/src/org/aspectj/testing/harness/bridge/Sandbox.java +++ b/testing/src/org/aspectj/testing/harness/bridge/Sandbox.java @@ -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.