aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs192
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2018-09-29 07:47:57 -0700
committerAndy Clement <aclement@pivotal.io>2018-09-29 07:47:57 -0700
commitf6d9aaaf05eca3aaf06d3a769a83f302b0501dca (patch)
treef2f8b3c99f0bd2a77a570f1bf230c2d7aca23647 /tests/bugs192
parent8aeb774d210a42240f2d6d89dd89e947a084fd7f (diff)
downloadaspectj-f6d9aaaf05eca3aaf06d3a769a83f302b0501dca.tar.gz
aspectj-f6d9aaaf05eca3aaf06d3a769a83f302b0501dca.zip
1.9.2.RC1 changesV1_9_2_RC1
Diffstat (limited to 'tests/bugs192')
-rw-r--r--tests/bugs192/535156/DemoApp.java15
-rw-r--r--tests/bugs192/535156/DemoApp2.java15
-rw-r--r--tests/bugs192/537825/Code.java53
3 files changed, 83 insertions, 0 deletions
diff --git a/tests/bugs192/535156/DemoApp.java b/tests/bugs192/535156/DemoApp.java
new file mode 100644
index 000000000..0f25c1568
--- /dev/null
+++ b/tests/bugs192/535156/DemoApp.java
@@ -0,0 +1,15 @@
+import org.aspectj.lang.annotation.*;
+
+public class DemoApp {
+ public static void main(String[]argv) {}
+ private void recurseInsteadOfWhile() {
+ say();
+ }
+
+ public void say() { }
+}
+
+aspect X { // mixed style here...
+ @Around("call(public void DemoApp+.say(..))")
+ public void y() {}
+}
diff --git a/tests/bugs192/535156/DemoApp2.java b/tests/bugs192/535156/DemoApp2.java
new file mode 100644
index 000000000..d48201be1
--- /dev/null
+++ b/tests/bugs192/535156/DemoApp2.java
@@ -0,0 +1,15 @@
+import org.aspectj.lang.annotation.*;
+
+public class DemoApp2 {
+ public static void main(String[]argv) {}
+ private void recurseInsteadOfWhile() {
+ say();
+ }
+
+ public void say() { }
+}
+
+aspect X {
+ void around(): call(public void DemoApp2+.say(..)) {
+ }
+}
diff --git a/tests/bugs192/537825/Code.java b/tests/bugs192/537825/Code.java
new file mode 100644
index 000000000..fa97b47c6
--- /dev/null
+++ b/tests/bugs192/537825/Code.java
@@ -0,0 +1,53 @@
+public class Code {
+
+ public static void main(String[] args) {
+ A.methodA();
+ }
+
+}
+
+class A {
+
+ public static void methodA() {
+ B.methodB();
+ }
+
+}
+
+class B {
+
+ public static void methodB() {
+ C.methodC();
+ int a = 1;
+ int b = 2;
+ System.out.println( a + b );
+ }
+
+}
+
+class C {
+
+ public static void methodC() {
+ D.methodD();
+ }
+
+}
+
+class D {
+
+ public static void methodD() {
+
+ }
+
+}
+
+aspect CFlow {
+
+ public pointcut flow() : cflow(call( * B.methodB() ) ) && !within(CFlow);
+
+ before() : flow() {
+ System.out.println( thisJoinPoint );
+ }
+
+}
+