summaryrefslogtreecommitdiffstats
path: root/tests/bugs150/pr101047.aj
blob: f64bd6ebcec698f07fcb04a81b0a0899bf19ac7e (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
aspect Test {
	before() : ( execution(* Foo.foo(..) ) ) {
		System.out.println("before");
		
	}
}

class Foo {
    private String myString = "A String";

    public static void main(String[] args) {
        new Foo().foo();  
    }
    
    private void foo() { 
        String myLocal = myString;
    
        if (myLocal.endsWith("X")) {
      	   String local1 = "local1";
           System.out.println(local1);
        } else if (myLocal.endsWith("Y")) {
           String local2 = "local2";
           System.out.println(local2);
        } else {
      	  String local1 = "local3";
          System.out.println(local1);
        }
      }
}