]> source.dussan.org Git - aspectj.git/commitdiff
Bug 158205 "NullPointerException when weaving with bootstrap agent" (improve declare...
authormwebster <mwebster>
Mon, 2 Oct 2006 10:01:44 +0000 (10:01 +0000)
committermwebster <mwebster>
Mon, 2 Oct 2006 10:01:44 +0000 (10:01 +0000)
loadtime/src/org/aspectj/weaver/loadtime/DefaultMessageHandler.java
tests/java5/ataspectj/ataspectj/aop-decptest.xml
tests/src/org/aspectj/systemtest/ajc150/ataspectj/ltw.xml

index df06ee77300aec9bcd08ec22b4830fa7e0012329..6589663fdbf850cdbbc8f3addeaba65ed41c5751 100644 (file)
@@ -29,11 +29,19 @@ public class DefaultMessageHandler implements IMessageHandler {
         if (isIgnoring(message.getKind())) {
                return false;
        } else {
-            if (message.getKind().isSameOrLessThan(IMessage.INFO)) {
-                return SYSTEM_OUT.handleMessage(message);
-            } else {
-                return SYSTEM_ERR.handleMessage(message);
-            }
+               /*
+                * TODO maw We ship this class but don't use or document it. Changed
+                * to use stderr instead of stdout to allow improvements to LTW tests.
+                * Currently many pass whether or not LTW occurs because they are
+                * already woven. Some changed to check for appropriate weaving messages
+                * as well as absence of warnings or errors. 
+                */
+               return SYSTEM_ERR.handleMessage(message);
+//            if (message.getKind().isSameOrLessThan(IMessage.INFO)) {
+//                return SYSTEM_OUT.handleMessage(message);
+//            } else {
+//                return SYSTEM_ERR.handleMessage(message);
+//            }
         }
     }
 
index 3e607df7d9172baaab314f910b56fa50eb9bf621..f602f40be5ccc8aec512612de25b834e3aec2d94 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <aspectj>
-    <weaver options="-XmessageHandlerClass:ataspectj.TestHelper -1.5 -Xlint:ignore"/>
+    <weaver options="-XmessageHandlerClass:ataspectj.TestHelper -1.5 -Xlint:ignore -showWeaveInfo"/>
     <aspects>
         <aspect name="ataspectj.DeclareParentsImplementsTest.TestAspect"/>
         <aspect name="ataspectj.DeclareParentsInterfaceTest.TestAspect"/>
index a27ecd482c2bff30a445cef0ec1b6eb494d84e6c..2fb728485dce7fe158344977aab782eddcacb1ac 100644 (file)
                 options="-1.5"
                 />
         <!--<run class="ataspectj.DeclareParentsInterfaceTest" ltw="ataspectj/aop-decptest.xml"/>-->
-        <ant file="ajc-ant.xml" target="ltw.Decp" verbose="true"/>
+        <ant file="ajc-ant.xml" target="ltw.Decp" verbose="true">
+               <stderr>
+                <line text="weaveinfo Extending interface set for type 'ataspectj.DeclareParentsInterfaceTest$Target' (DeclareParentsInterfaceTest.java) to include 'ataspectj.DeclareParentsInterfaceTest$Marker' (DeclareParentsInterfaceTest.java)"/>
+                <line text="weaveinfo Join point 'method-execution(void ataspectj.DeclareParentsInterfaceTest$Target.target())' in Type 'ataspectj.DeclareParentsInterfaceTest$Target' (DeclareParentsInterfaceTest.java:27) advised by before advice from 'ataspectj.DeclareParentsInterfaceTest$TestAspect' (DeclareParentsInterfaceTest.java)"/>
+                <line text="weaveinfo Extending interface set for type 'ataspectj.DeclareParentsImplementsTest$Target' (DeclareParentsImplementsTest.java) to include 'ataspectj.DeclareParentsImplementsTest$Introduced' (DeclareParentsImplementsTest.java)"/>
+                <line text="weaveinfo Type 'ataspectj.DeclareParentsImplementsTest$Target' (DeclareParentsImplementsTest.java) has intertyped method from 'ataspectj.DeclareParentsImplementsTest$TestAspect' (DeclareParentsImplementsTest.java:'void ataspectj.DeclareParentsImplementsTest$Introduced.intro()')"/>
+                <line text="weaveinfo Join point 'method-execution(void ataspectj.DeclareParentsImplementsTest$Implementation.intro())' in Type 'ataspectj.DeclareParentsImplementsTest$Implementation' (DeclareParentsImplementsTest.java:47) advised by before advice from 'ataspectj.DeclareParentsImplementsTest$TestAspect' (DeclareParentsImplementsTest.java)"/>
+            </stderr>
+        </ant>
     </ajc-test>
 
     <ajc-test dir="java5/ataspectj" title="LTW Decp2">