aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/lazyTjpXLintWarning/Scenario4.aj
blob: 0ce25af62cbe7a1ad54caa61e7a536b95bf0879c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// "no XLint warning: thisJoinPoint cannot be built lazily"

public aspect Scenario4 {

    public static boolean enabled = true;

    pointcut toBeTraced() : execution(* main(..));

    before () : toBeTraced() { // no if condition
        Object[] args = thisJoinPoint.getArgs(); // tjp not made lazily
        System.out.println(thisJoinPoint + ", arg's: " + args.length);
    }

}

class Test{
  static void main(String [] args){
  }
}