]> source.dussan.org Git - aspectj.git/commitdiff
210114: test and fix: errors for compiler limitations become warnings
authoraclement <aclement>
Thu, 21 Aug 2008 18:00:21 +0000 (18:00 +0000)
committeraclement <aclement>
Thu, 21 Aug 2008 18:00:21 +0000 (18:00 +0000)
tests/bugs162/pr210114/TestAspect.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java
tests/src/org/aspectj/systemtest/ajc162/ajc162.xml

diff --git a/tests/bugs162/pr210114/TestAspect.java b/tests/bugs162/pr210114/TestAspect.java
new file mode 100644 (file)
index 0000000..f641673
--- /dev/null
@@ -0,0 +1,20 @@
+package test;
+
+public aspect TestAspect {
+        Object around() : within(TestClass) {
+                return proceed();
+        }
+
+        after() : within(TestClass) {
+        }
+}
+
+class TestClass {
+        public void test() {
+                try {
+                        new String();
+                } catch (Exception ex) {
+                }
+        }
+}
+
index 2862c298fbf826f5cd1e516dda0489c9e84ebabd..08dba1573b8531dce1f79242984db295ceba16bf 100644 (file)
@@ -19,6 +19,7 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
 public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        
        // AspectJ1.6.2 
+       public void testWarningsForLimitations_pr210114() { runTest("warnings for limitations"); }
        public void testPTW_pr244830() { runTest("ptw initFailureCause"); }
        public void testGenericItdsOverrides_pr222648() { runTest("generic itds - overrides"); }
        public void testGenericItdsOverrides_pr222648_2() { runTest("generic itds - overrides - 2"); }
index bdea360d1d7c87c8dc331594212dddd2859a1664..ccbe977f087b02c4709fbab1d147608d2857651c 100644 (file)
@@ -3,6 +3,14 @@
 <!-- AspectJ v1.6.2 Tests -->
 <suite>
 
+       <ajc-test dir="bugs162/pr210114" title="warnings for limitations">
+         <compile files="TestAspect.java" options="-1.5">
+               <message kind="warning" text="Only before advice is supported on handler join points (compiler limitation)"/>
+               <message kind="warning" text="around on initialization not supported (compiler limitation)"/>
+               <message kind="warning" text="around on pre-initialization not supported (compiler limitation)"/>         
+         </compile>
+       </ajc-test>
+       
        <ajc-test dir="bugs162/pr244830" title="ptw initFailureCause">
          <compile files="PTW.java" options="-1.5"/>
          <run class="PTW"/>