From 7e3b3f9016cb0ceb3a15bb3fab1669e34b1a0ef1 Mon Sep 17 00:00:00 2001 From: wisberg Date: Sat, 24 May 2003 09:27:04 +0000 Subject: [PATCH] awful downcast for AjcTaskCompileCommand - should be remedied after 1.1 with ICommand interface extension --- testing/src/org/aspectj/testing/harness/bridge/Sandbox.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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. -- 2.39.5