aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs160/pr145018/Broken.aj
blob: adde2e9e4636209648e917ee4dfdce361197e408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import java.util.*;
import org.aspectj.lang.annotation.*;

@Aspect
public class Broken {

	@Pointcut("call(* someMethod(..)) && args(arg1) && if()")
    public static boolean someMethod2if(int arg1) {
      return true;
    }

    @Pointcut("cflow(execution(* doProcess(..) ) && args(*, args)) && this(SomeClass+) ")
    public void inSomeClass2(Map args) {}

    @After( "inSomeClass2(args) && someMethod2if(arg1) ")
    public void deleteManagerInSomeClass2(Map args,int arg1) { }
    
    public static void main(String[] args) {
		new SomeClass().doProcess("a",new HashMap());
	}
}

class SomeClass {

  public void doProcess(Object o, Map m) {
    someMethod(1);
  }

  public void someMethod(int a) { }
}