]> source.dussan.org Git - aspectj.git/commitdiff
Updated with suppression attribute for non-matching advice.
authoraclement <aclement>
Thu, 17 Feb 2005 15:06:17 +0000 (15:06 +0000)
committeraclement <aclement>
Thu, 17 Feb 2005 15:06:17 +0000 (15:06 +0000)
tests/java5/annotations/AnnotationAspect02.aj
tests/java5/annotations/args/AtArgsAspect.java
tests/java5/annotations/binding/complexExample/X4.java
tests/java5/covariance/CovAspect06.aj
tests/java5/covariance/CovAspect09.aj
tests/java5/varargs/VarargsAspect01.aj
tests/java5/varargs/VarargsAspect02.aj
tests/java5/varargs/VarargsAspect03.aj
tests/java5/varargs/VarargsAspect04.aj

index ddc3cc48d9c4fc97d335b3a0c34ccb3c09df0259..00bb10941817648f2e88bc7a80551f7e7fce50dd 100644 (file)
@@ -1,5 +1,5 @@
 public aspect AnnotationAspect02 {\r
-  before(): call(@SimpleAnnotation * *(..)) {}\r
+  @org.aspectj.lang.annotation.SuppressAjWarnings before(): call(@SimpleAnnotation * *(..)) {}\r
 \r
-  before(): call( * *(..)) {}\r
+  @org.aspectj.lang.annotation.SuppressAjWarnings before(): call( * *(..)) {}\r
 }\r
index 5a5c8a4f735d3b286076d8f141b2784b12b5a0da..010808ef0be8ebcf2ad193e1c833fc209b030325 100644 (file)
@@ -9,14 +9,14 @@ public aspect AtArgsAspect {
                System.out.print("@args(*,*,*,*,*): ");
                System.out.println(TestingArgsAnnotations.expected() ? "PASS" : "FAIL");
        }
-       before() : myMethod() && !@args(*,*,*,*,*) {
+       @org.aspectj.lang.annotation.SuppressAjWarnings before() : myMethod() && !@args(*,*,*,*,*) {
                System.out.print("@args(*,*,*,*,*): ");
                System.out.println(!TestingArgsAnnotations.expected() ? "PASS" : "FAIL");
        }
        
        // One too few
        // test 1
-       before() : myMethod() && @args(*,*,*,*) {
+       @org.aspectj.lang.annotation.SuppressAjWarnings before() : myMethod() && @args(*,*,*,*) {
                System.out.print("@args(*,*,*,*): ");
                System.out.println(TestingArgsAnnotations.expected() ? "PASS" : "FAIL");
        }
@@ -27,7 +27,7 @@ public aspect AtArgsAspect {
        
        // One too many
        // test 2
-       before() : myMethod() && @args(*,*,*,*,*,*) {
+       @org.aspectj.lang.annotation.SuppressAjWarnings before() : myMethod() && @args(*,*,*,*,*,*) {
                System.out.print("@args(*,*,*,*,*,*): ");
                System.out.println(TestingArgsAnnotations.expected() ? "PASS" : "FAIL");
        }
@@ -42,7 +42,7 @@ public aspect AtArgsAspect {
                System.out.print("@args(*,*,..,*,*,*): ");
                System.out.println(TestingArgsAnnotations.expected() ? "PASS" : "FAIL");
        }
-       before() : myMethod() && !@args(*,*,..,*,*,*) {
+       @org.aspectj.lang.annotation.SuppressAjWarnings before() : myMethod() && !@args(*,*,..,*,*,*) {
                System.out.print("@args(*,*,..,*,*,*): ");
                System.out.println(!TestingArgsAnnotations.expected() ? "PASS" : "FAIL");
        }
@@ -53,7 +53,7 @@ public aspect AtArgsAspect {
                System.out.print("@args(*,*,*,..): ");
                System.out.println(TestingArgsAnnotations.expected() ? "PASS" : "FAIL");
        }
-       before() : myMethod() && !@args(*,*,*,..) {
+       @org.aspectj.lang.annotation.SuppressAjWarnings before() : myMethod() && !@args(*,*,*,..) {
                System.out.print("@args(*,*,*,..): ");
                System.out.println(!TestingArgsAnnotations.expected() ? "PASS" : "FAIL");
        }
@@ -97,7 +97,7 @@ public aspect AtArgsAspect {
                System.out.print("@args(..,@MyInheritableAnnotation,*): ");
                System.out.println(TestingArgsAnnotations.expected() ? "PASS" : "FAIL");
        }
-       before() : myMethod() && !@args(..,@MyInheritableAnnotation,*) {
+       @org.aspectj.lang.annotation.SuppressAjWarnings before() : myMethod() && !@args(..,@MyInheritableAnnotation,*) {
                System.out.print("@args(..,@MyInheritableAnnotation,*): ");
                System.out.println(!TestingArgsAnnotations.expected() ? "PASS" : "FAIL");
        }
@@ -107,7 +107,7 @@ public aspect AtArgsAspect {
                System.out.print("@args(..,@MyInheritableAnnotation,@MyInheritableAnnotation): ");
                System.out.println(TestingArgsAnnotations.expected() ? "PASS" : "FAIL");
        }
-       before() : myMethod() && !@args(..,@MyInheritableAnnotation,@MyInheritableAnnotation) {
+       @org.aspectj.lang.annotation.SuppressAjWarnings before() : myMethod() && !@args(..,@MyInheritableAnnotation,@MyInheritableAnnotation) {
                System.out.print("@args(..,@MyInheritableAnnotation,@MyInheritableAnnotation): ");
                System.out.println(!TestingArgsAnnotations.expected() ? "PASS" : "FAIL");
        }
@@ -122,4 +122,4 @@ public aspect AtArgsAspect {
                System.out.println(!TestingArgsAnnotations.expected() ? "PASS" : "FAIL");
        }
 
-}
\ No newline at end of file
+}
index edfb63ef188e589f548ae948e1d6ac256f507109..de910fe0fc14905f7fb839bd1c72db4a3ae6e184 100644 (file)
@@ -3,7 +3,7 @@ import a.b.c.A;
 public aspect X4 {
 
   // Error as Color not imported
-  before(A a): execution(@Color * A+.*(..)) && this(a) {
+  @org.aspectj.lang.annotation.SuppressAjWarnings before(A a): execution(@Color * A+.*(..)) && this(a) {
     System.err.println("Before call to "+thisJoinPoint);
   }
 
index bb49613603233ea86dcd3f9751782a577c3c234d..34d575ba5ef91085f14b17213adc676284f46b1e 100644 (file)
@@ -1,7 +1,8 @@
 aspect CovAspect06 {\r
        \r
   pointcut p(): call(Car Sub.getCar());\r
-\r
\r
+  @org.aspectj.lang.annotation.SuppressAjWarnings\r
   before(): p() {\r
        System.out.println("[call(Car Sub.getCar()) matched on '"+thisJoinPoint+":"+thisJoinPoint.getSourceLocation()+"']");\r
   }\r
index 6a34970483c85545772713975260ad2355297d2d..aad549dd33032dee56a553335414b2d2ebaf4e7e 100644 (file)
@@ -2,6 +2,7 @@ aspect CovAspect09 {
        \r
   pointcut p1(): call(FastCar Super.getCar());\r
 \r
+  @org.aspectj.lang.annotation.SuppressAjWarnings\r
   before(): p1() {\r
        System.out.println("[call(FastCar Super.getCar()) matched on '"+thisJoinPoint+":"+thisJoinPoint.getSourceLocation()+"']");\r
   }\r
index 8b30c70178dae1ed11a6a51c843fdd1dbc25c842..2025150f24a51f67f566f104619cba4930e3a277 100644 (file)
@@ -1,5 +1,6 @@
 public aspect VarargsAspect01 {\r
 \r
+  @org.aspectj.lang.annotation.SuppressAjWarnings\r
   before(): call(* *(Integer[])) { }\r
 \r
 }\r
index a64b7462d419c61dad10f77b511db9ce702cbcad..5385942eb37eb9804f45f53282e9dcac1046834e 100644 (file)
@@ -1,5 +1,6 @@
 public aspect VarargsAspect02 {\r
 \r
+  @org.aspectj.lang.annotation.SuppressAjWarnings\r
   before(): execution(* *(Integer[])) { }\r
 \r
 }\r
index c1b37e1bf056e11ad03aaeb269c349a877543f66..430d1dcd4a98266baeddc8b04b417d53cc78c746 100644 (file)
@@ -1,5 +1,6 @@
 public aspect VarargsAspect03 {\r
 \r
+  @org.aspectj.lang.annotation.SuppressAjWarnings\r
   before(): initialization(new(Integer[])) { }\r
 \r
 }\r
index 1eb425536c4935ce5b9944fd579da2da73997c79..35d0e36ecea592180cf9cb7692aea0509c9323a8 100644 (file)
@@ -1,5 +1,6 @@
 public aspect VarargsAspect04 {\r
 \r
+  @org.aspectj.lang.annotation.SuppressAjWarnings\r
   before(): withincode(* *(Integer[])) && call(* *(..)) { }\r
 \r
 }\r