aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2011-01-24 22:41:24 +0000
committeraclement <aclement>2011-01-24 22:41:24 +0000
commitcd4d7e707121f719bc6f5625341b30c11c3d3bfe (patch)
tree92c85510db973fe57a3f5ada5161efab8f8026a4
parentd15ad6f11f9beb58de925f812bf7506127d27e27 (diff)
downloadaspectj-cd4d7e707121f719bc6f5625341b30c11c3d3bfe.tar.gz
aspectj-cd4d7e707121f719bc6f5625341b30c11c3d3bfe.zip
333274: testcode
-rw-r--r--tests/bugs1611/pr333274/ma/Annotation1.java9
-rw-r--r--tests/bugs1611/pr333274/ma/Main.java16
-rw-r--r--tests/bugs1611/pr333274/ma/Precedence.java10
-rw-r--r--tests/bugs1611/pr333274/ma/aspect1/Aspect1.java25
-rw-r--r--tests/bugs1611/pr333274/ma/aspect3/Aspect3.java22
-rw-r--r--tests/bugs1611/pr333274/ma2/Annotation1.java9
-rw-r--r--tests/bugs1611/pr333274/ma2/Main.java16
-rw-r--r--tests/bugs1611/pr333274/ma2/Precedence.java10
-rw-r--r--tests/bugs1611/pr333274/ma2/aspect1/Aspect1.java23
-rw-r--r--tests/bugs1611/pr333274/ma2/aspect3/Aspect3.java20
10 files changed, 160 insertions, 0 deletions
diff --git a/tests/bugs1611/pr333274/ma/Annotation1.java b/tests/bugs1611/pr333274/ma/Annotation1.java
new file mode 100644
index 000000000..67e06ae54
--- /dev/null
+++ b/tests/bugs1611/pr333274/ma/Annotation1.java
@@ -0,0 +1,9 @@
+package ma;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Annotation1 {
+
+}
diff --git a/tests/bugs1611/pr333274/ma/Main.java b/tests/bugs1611/pr333274/ma/Main.java
new file mode 100644
index 000000000..543e39e60
--- /dev/null
+++ b/tests/bugs1611/pr333274/ma/Main.java
@@ -0,0 +1,16 @@
+package ma;
+
+
+public class Main {
+
+ @Annotation1
+ public int retryTranslateAndTimeLimited() {
+ System.out.println("Method call");
+ return 1;
+ }
+
+ public static void main(String[] args) {
+ new Main().retryTranslateAndTimeLimited();
+ }
+
+}
diff --git a/tests/bugs1611/pr333274/ma/Precedence.java b/tests/bugs1611/pr333274/ma/Precedence.java
new file mode 100644
index 000000000..bc5263757
--- /dev/null
+++ b/tests/bugs1611/pr333274/ma/Precedence.java
@@ -0,0 +1,10 @@
+package ma;
+
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.DeclarePrecedence;
+
+@Aspect
+@DeclarePrecedence("ma.aspect1.Aspect1, ma.aspect3.Aspect3")
+class Precedence {
+
+}
diff --git a/tests/bugs1611/pr333274/ma/aspect1/Aspect1.java b/tests/bugs1611/pr333274/ma/aspect1/Aspect1.java
new file mode 100644
index 000000000..b76a0ca8f
--- /dev/null
+++ b/tests/bugs1611/pr333274/ma/aspect1/Aspect1.java
@@ -0,0 +1,25 @@
+package ma.aspect1;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+
+
+@Aspect
+public class Aspect1 {
+
+ @Around("execution(@ma.Annotation1 * *(..))")
+ public Object inRetryAspect(ProceedingJoinPoint pjp) throws Throwable {
+ new InternalClass();
+ System.out.println(">In Aspect1");
+ pjp.proceed();
+ System.out.println("=In Aspect1");
+ Object o = pjp.proceed();
+ System.out.println("<In Aspect1");
+ return o;
+ }
+
+ private static class InternalClass {
+ }
+
+}
diff --git a/tests/bugs1611/pr333274/ma/aspect3/Aspect3.java b/tests/bugs1611/pr333274/ma/aspect3/Aspect3.java
new file mode 100644
index 000000000..93c17cee8
--- /dev/null
+++ b/tests/bugs1611/pr333274/ma/aspect3/Aspect3.java
@@ -0,0 +1,22 @@
+package ma.aspect3;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+
+@Aspect
+public class Aspect3 {
+
+ @Around("execution(@ma.Annotation1 * *(..))")
+ public Object inTimeLimiterAspect(ProceedingJoinPoint pjp) throws Throwable {
+ new InnerClass2();
+ System.out.println(">In Aspect3");
+ Object returnedObject = pjp.proceed();
+ System.out.println("<In Aspect3");
+ return returnedObject;
+ }
+
+ private static class InnerClass2 {
+
+ }
+}
diff --git a/tests/bugs1611/pr333274/ma2/Annotation1.java b/tests/bugs1611/pr333274/ma2/Annotation1.java
new file mode 100644
index 000000000..1c8ab25bd
--- /dev/null
+++ b/tests/bugs1611/pr333274/ma2/Annotation1.java
@@ -0,0 +1,9 @@
+package ma2;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Annotation1 {
+
+}
diff --git a/tests/bugs1611/pr333274/ma2/Main.java b/tests/bugs1611/pr333274/ma2/Main.java
new file mode 100644
index 000000000..52e93f212
--- /dev/null
+++ b/tests/bugs1611/pr333274/ma2/Main.java
@@ -0,0 +1,16 @@
+package ma2;
+
+
+public class Main {
+
+ @Annotation1
+ public int retryTranslateAndTimeLimited() {
+ System.out.println("Method call");
+ return 1;
+ }
+
+ public static void main(String[] args) {
+ new Main().retryTranslateAndTimeLimited();
+ }
+
+}
diff --git a/tests/bugs1611/pr333274/ma2/Precedence.java b/tests/bugs1611/pr333274/ma2/Precedence.java
new file mode 100644
index 000000000..bdfd1565e
--- /dev/null
+++ b/tests/bugs1611/pr333274/ma2/Precedence.java
@@ -0,0 +1,10 @@
+package ma2;
+
+import org.aspectj.lang.annotation.Aspect;
+import org.aspectj.lang.annotation.DeclarePrecedence;
+
+@Aspect
+@DeclarePrecedence("ma2.aspect1.Aspect1, ma2.aspect3.Aspect3")
+class Precedence {
+
+}
diff --git a/tests/bugs1611/pr333274/ma2/aspect1/Aspect1.java b/tests/bugs1611/pr333274/ma2/aspect1/Aspect1.java
new file mode 100644
index 000000000..e035967bb
--- /dev/null
+++ b/tests/bugs1611/pr333274/ma2/aspect1/Aspect1.java
@@ -0,0 +1,23 @@
+package ma2.aspect1;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+
+
+public aspect Aspect1 {
+
+ Object around(): execution(@ma2.Annotation1 * *(..)) {
+ new InternalClass();
+ System.out.println(">In Aspect1");
+ proceed();
+ System.out.println("=In Aspect1");
+ Object o = proceed();
+ System.out.println("<In Aspect1");
+ return o;
+ }
+
+ private static class InternalClass {
+ }
+
+}
diff --git a/tests/bugs1611/pr333274/ma2/aspect3/Aspect3.java b/tests/bugs1611/pr333274/ma2/aspect3/Aspect3.java
new file mode 100644
index 000000000..06280ae99
--- /dev/null
+++ b/tests/bugs1611/pr333274/ma2/aspect3/Aspect3.java
@@ -0,0 +1,20 @@
+package ma2.aspect3;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.Around;
+import org.aspectj.lang.annotation.Aspect;
+
+public aspect Aspect3 {
+
+ Object around(): execution(@ma2.Annotation1 * *(..)) {
+ new InnerClass2();
+ System.out.println(">In Aspect3");
+ Object returnedObject = proceed();
+ System.out.println("<In Aspect3");
+ return returnedObject;
+ }
+
+ private static class InnerClass2 {
+
+ }
+}