]> source.dussan.org Git - aspectj.git/commitdiff
avoiding aspect advising its own constructor
authorjhugunin <jhugunin>
Tue, 7 Jan 2003 23:10:23 +0000 (23:10 +0000)
committerjhugunin <jhugunin>
Tue, 7 Jan 2003 23:10:23 +0000 (23:10 +0000)
tests/new/DeclaredExcs.java

index 21b1f1009f2ef2b4a6f294d47beeed73abe5ccc8..f6f13c305568ae8afe57df028c8cde293958be52 100644 (file)
@@ -81,13 +81,13 @@ class MyException extends Exception {
 }
 
 aspect A {
-    before (): this(*) && execution(* *(..)) || execution(new(..)) {
+    before (): (this(*) && execution(* *(..)) || execution(new(..))) && !within(A) {
        //System.out.println("entering: "+thisJoinPoint);
     }
-    after (): this(*) && execution(* *(..)) || execution(new(..)) {
+
+    after (): (this(*) && execution(* *(..)) || execution(new(..))) && !within(A) {
        //System.out.println("exiting: "+thisJoinPoint);
-    }
-    
+    }  
     Object around(): this(*) && call(* *(..)) {    
        //System.out.println("start around: "+thisJoinPoint);
        Object ret = proceed();