From: wisberg Date: Thu, 12 May 2005 10:59:00 +0000 (+0000) Subject: avoid harness ajcore files - ensure Dump message holder is not null for clients not... X-Git-Tag: PRE_ANDY~324 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=8ba1011bac38511fe8546766951c08d812257de2;p=aspectj.git avoid harness ajcore files - ensure Dump message holder is not null for clients not using Main interface. --- diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/AjdtCommand.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/AjdtCommand.java index 7b1fa8c7e..949f97cbf 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/AjdtCommand.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/AjdtCommand.java @@ -87,7 +87,10 @@ public class AjdtCommand implements ICommand { */ protected boolean doCommand(IMessageHandler handler, boolean repeat) { try { - //buildManager.setMessageHandler(handler); + if (handler instanceof IMessageHolder) { + Dump.saveMessageHolder((IMessageHolder) handler); + } + // buildManager.setMessageHandler(handler); CountingMessageHandler counter = new CountingMessageHandler(handler); if (counter.hasErrors()) { return false; diff --git a/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java b/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java index 365242c73..5b701334a 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java @@ -32,7 +32,6 @@ import org.aspectj.bridge.ReflectionFactory; import org.aspectj.bridge.Version; import org.aspectj.util.FileUtil; import org.aspectj.util.LangUtil; -import org.aspectj.weaver.Dump; /** * Programmatic and command-line interface to AspectJ compiler. @@ -269,7 +268,6 @@ public class Main { * @param holder the MessageHandler sink for messages. */ public void run(String[] args, IMessageHolder holder) { - Dump.saveMessageHolder(holder); if (LangUtil.isEmpty(args)) { args = new String[] { "-?" }; } else if (controller.running()) {