diff options
Diffstat (limited to 'tests/bugs/lazyTjpXLintWarning/Scenario1.aj')
-rw-r--r-- | tests/bugs/lazyTjpXLintWarning/Scenario1.aj | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/bugs/lazyTjpXLintWarning/Scenario1.aj b/tests/bugs/lazyTjpXLintWarning/Scenario1.aj new file mode 100644 index 000000000..000d47a7a --- /dev/null +++ b/tests/bugs/lazyTjpXLintWarning/Scenario1.aj @@ -0,0 +1,19 @@ +// "no XLint warning: thisJoinPoint potentially lazy and nothing stopping it" + +public aspect Scenario1 { + + public static boolean enabled = true; + + pointcut toBeTraced() : execution(* main(..)); + + before () : toBeTraced() && if(enabled) { + Object[] args = thisJoinPoint.getArgs(); // tjp made lazily + System.out.println(thisJoinPoint + ", arg's: " + args.length); + } + +} + +class Test{ + static void main(String [] args){ + } +} |