]> source.dussan.org Git - aspectj.git/commitdiff
364380
authoraclement <aclement>
Tue, 22 Nov 2011 19:31:45 +0000 (19:31 +0000)
committeraclement <aclement>
Tue, 22 Nov 2011 19:31:45 +0000 (19:31 +0000)
tests/bugs170/pr364380/C.java [new file with mode: 0644]
tests/bugs170/pr364380/X.aj [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc170/Ajc170Tests.java
tests/src/org/aspectj/systemtest/ajc170/ajc170.xml

diff --git a/tests/bugs170/pr364380/C.java b/tests/bugs170/pr364380/C.java
new file mode 100644 (file)
index 0000000..9d93061
--- /dev/null
@@ -0,0 +1,14 @@
+package ca;
+
+import org.aspectj.lang.annotation.*;
+
+public class C {
+
+  public static void main(String[]argv) {
+    new C().setOwner();
+  }
+
+  public void setOwner() {
+  }
+
+}
diff --git a/tests/bugs170/pr364380/X.aj b/tests/bugs170/pr364380/X.aj
new file mode 100644 (file)
index 0000000..c69da11
--- /dev/null
@@ -0,0 +1,16 @@
+package ca;
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+class OwnershipSecurityAspect {
+
+
+   @Pointcut("call(public void ca..setOwner(..)) && !within(ca..OwnershipSecurityAspect) && !within(ca..*Test)")
+   protected void myPcut() {}
+
+   @DeclareWarning("myPcut()")
+   public static final String securityError = "An advice already exists for setting an owner";
+
+
+
+}
index 741ba71c8f5868194da3400aba47f322eec0df7a..4fd14154493a2f0b3e56f5080b507c2b9ad6aeb2 100644 (file)
@@ -29,6 +29,10 @@ public class Ajc170Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
                runTest("missing impl 2");
        }
 
+       public void testStackOverflow_364380() {
+               runTest("stackoverflow");
+       }
+
        // ---
 
        public static Test suite() {
index 0631a677e061028ebc930c32b38014689f8507da..45287ceb307c2b336bf23a0442ed6846ea3b12b8 100644 (file)
      </run>
    </ajc-test>
    
-  
+   <ajc-test dir="bugs170/pr364380" title="stackoverflow">
+     <compile files="X.aj" options="-1.5" outjar="foo.jar"/>
+     <compile files="C.java" options="-1.5" inpath="foo.jar">
+     <message kind="warning" text="An advice already exists for setting an owner"/>
+     </compile>
+   </ajc-test>
+   
 </suite>
\ No newline at end of file