diff options
author | aclement <aclement> | 2010-06-03 19:36:04 +0000 |
---|---|---|
committer | aclement <aclement> | 2010-06-03 19:36:04 +0000 |
commit | e54ac87be2877bffb2bb107e0817403a2d4e62b4 (patch) | |
tree | 3649c4b643c9b4d7d74794011dc38dd704238c27 /tests/bugs169 | |
parent | 193e5449c987e952f5feeec47f76e3944660a0fe (diff) | |
download | aspectj-e54ac87be2877bffb2bb107e0817403a2d4e62b4.tar.gz aspectj-e54ac87be2877bffb2bb107e0817403a2d4e62b4.zip |
315651
Diffstat (limited to 'tests/bugs169')
-rw-r--r-- | tests/bugs169/pr315651/test/Main.java | 12 | ||||
-rw-r--r-- | tests/bugs169/pr315651/test/Profiling.aj | 17 |
2 files changed, 29 insertions, 0 deletions
diff --git a/tests/bugs169/pr315651/test/Main.java b/tests/bugs169/pr315651/test/Main.java new file mode 100644 index 000000000..c62c920b6 --- /dev/null +++ b/tests/bugs169/pr315651/test/Main.java @@ -0,0 +1,12 @@ + +package test; +public class Main { + + private static int plus(int first, int second){ + return first + second; + } + public static void main(String[] args) { + int num = plus(42,13); + System.out.println(num); + } +} diff --git a/tests/bugs169/pr315651/test/Profiling.aj b/tests/bugs169/pr315651/test/Profiling.aj new file mode 100644 index 000000000..2672a465e --- /dev/null +++ b/tests/bugs169/pr315651/test/Profiling.aj @@ -0,0 +1,17 @@ +package test; + +public aspect Profiling { + pointcut profile(): execution(* *.*(..)) ; + + private pointcut scope() : + if(condition()) + //&& !(execution(* *.condition())) <- uncomment and infinite loop disappears + && !cflow(execution(* *.condition())); + + public static boolean condition(){ + return (Math.random()<2); //always true + } + before(): profile() && scope() { + System.out.println("Entering method "+thisJoinPointStaticPart.getSignature()); + } +} |