aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/WeaveLocal.java
blob: 25c882afd8308982ae1367b7f79e167393025674 (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
31
32
33
34
35
36
37
// for Bug#:  32463  
import org.aspectj.testing.Tester;


public class WeaveLocal
{
    // Commenting out the static declaration makes everything work OK
    static
    {
        class StaticNestedClass
        {
        }
    }
    
    public static void main(String[] args)
    {
      System.out.println(new WeaveLocal().handleOrder("test"));
    }

    private String handleOrder(String t)
    {
      return t;
    }

}

aspect A  {

    pointcut withinTest(): within(WeaveLocal);
    pointcut callToHandleOrder() : (withinTest() &&
                             call(* handleOrder(..)));

    Object around(): callToHandleOrder() {

      return "DUMMY inserted by ASPECT" ;
   }
}