]> source.dussan.org Git - aspectj.git/commitdiff
avoid harness ajcore files - ensure Dump message holder is not null for clients not...
authorwisberg <wisberg>
Thu, 12 May 2005 10:59:00 +0000 (10:59 +0000)
committerwisberg <wisberg>
Thu, 12 May 2005 10:59:00 +0000 (10:59 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/AjdtCommand.java
org.aspectj.ajdt.core/src/org/aspectj/tools/ajc/Main.java

index 7b1fa8c7ecff57867ccee2551bde10e9df2daa96..949f97cbffc55a1ca481c54b821ba3f2d3de0453 100644 (file)
@@ -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;
index 365242c739adbb7643fcb5abc72a0789f16b913e..5b701334a401079626d24854bb5fe3fdf77a0b85 100644 (file)
@@ -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()) {