]> source.dussan.org Git - aspectj.git/commitdiff
fixed Bug 29934
authorjhugunin <jhugunin>
Wed, 12 Mar 2003 00:48:57 +0000 (00:48 +0000)
committerjhugunin <jhugunin>
Wed, 12 Mar 2003 00:48:57 +0000 (00:48 +0000)
   runtime NullPointerException when applying around advice to other around advice

tests/ajcTests.xml
tests/ajcTestsFailing.xml
tests/jimTests.xml
weaver/src/org/aspectj/weaver/bcel/BcelShadow.java

index a2e0b3c6ef57ef933fa9ee521429226aca4acf7f..ba710c8b9d78a0a250fa8a7f697fec5ab9c73eed 100644 (file)
             <message kind="warning" line="74"/>
         </compile>
     </ajc-test>
+    
+    <ajc-test dir="new" pr="29934"
+      title="can't apply around advice to the execution of around advice"
+      keywords="from-resolved_10x">
+        <compile files="CflowCycles.java"/>
+        <run class="CflowCycles"/>
+    </ajc-test>
 </suite>
index b7fadc1465b4171cb8bae7d815cb7a0979c77122..5964c4aeec5a266b316bbc692d41ae89f7ca885e 100644 (file)
             <message kind="error" line="78"/>
         </compile>
     </ajc-test>
-    
-    <ajc-test dir="new" pr="29934"
-      title="can't apply around advice to the execution of around advice"
-      keywords="from-resolved_10x">
-        <compile files="CflowCycles.java"/>
-        <run class="CflowCycles"/>
-    </ajc-test>
 
     <ajc-test dir="new" pr="660" title="illegal name binding in around cflow"
       keywords="from-resolved_104">
index 53a3a9ef1d2f5f755cba2b8e2999ace5228bec53..e55e54ff7f975009d4f65b1bff775ea52e6faa8c 100644 (file)
@@ -1,6 +1,11 @@
 <!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd">
 <suite>
-
+    <ajc-test dir="new" pr="29934"
+      title="can't apply around advice to the execution of around advice"
+      keywords="from-resolved_10x">
+        <compile files="CflowCycles.java"/>
+        <run class="CflowCycles"/>
+    </ajc-test>
 
     <!--
     
index f0b0742d8f52065b25462230b8ac22c90bd4faaf..6059e7d9fd7dfc0edd260d28ec7f544d86c34432 100644 (file)
@@ -1206,6 +1206,10 @@ public class BcelShadow extends Shadow {
                        return;
                }
                
+               // We can't inline around methods if they have around advice on them, this
+               // is because the weaving will extract the body and hence the proceed call.
+               //??? should consider optimizations to recognize simple cases that don't require body extraction
+               enclosingMethod.setCanInline(false);
                
                
                // start by exposing various useful things into the frame