From cd4d7e707121f719bc6f5625341b30c11c3d3bfe Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 24 Jan 2011 22:41:24 +0000 Subject: [PATCH] 333274: testcode --- tests/bugs1611/pr333274/ma/Annotation1.java | 9 +++++++ tests/bugs1611/pr333274/ma/Main.java | 16 ++++++++++++ tests/bugs1611/pr333274/ma/Precedence.java | 10 ++++++++ .../bugs1611/pr333274/ma/aspect1/Aspect1.java | 25 +++++++++++++++++++ .../bugs1611/pr333274/ma/aspect3/Aspect3.java | 22 ++++++++++++++++ tests/bugs1611/pr333274/ma2/Annotation1.java | 9 +++++++ tests/bugs1611/pr333274/ma2/Main.java | 16 ++++++++++++ tests/bugs1611/pr333274/ma2/Precedence.java | 10 ++++++++ .../pr333274/ma2/aspect1/Aspect1.java | 23 +++++++++++++++++ .../pr333274/ma2/aspect3/Aspect3.java | 20 +++++++++++++++ 10 files changed, 160 insertions(+) create mode 100644 tests/bugs1611/pr333274/ma/Annotation1.java create mode 100644 tests/bugs1611/pr333274/ma/Main.java create mode 100644 tests/bugs1611/pr333274/ma/Precedence.java create mode 100644 tests/bugs1611/pr333274/ma/aspect1/Aspect1.java create mode 100644 tests/bugs1611/pr333274/ma/aspect3/Aspect3.java create mode 100644 tests/bugs1611/pr333274/ma2/Annotation1.java create mode 100644 tests/bugs1611/pr333274/ma2/Main.java create mode 100644 tests/bugs1611/pr333274/ma2/Precedence.java create mode 100644 tests/bugs1611/pr333274/ma2/aspect1/Aspect1.java create mode 100644 tests/bugs1611/pr333274/ma2/aspect3/Aspect3.java 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 Aspect3"); + Object returnedObject = pjp.proceed(); + System.out.println("In Aspect1"); + proceed(); + System.out.println("=In Aspect1"); + Object o = proceed(); + System.out.println("In Aspect3"); + Object returnedObject = proceed(); + System.out.println("