From 443dd2314cc8ae2af84f6c493fd19bc5369c8aba Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 28 Sep 2011 01:15:55 +0000 Subject: [PATCH] 359159 --- tests/bugs1612/xmldefs/A.java | 16 ++++++++++ tests/bugs1612/xmldefs/C.java | 11 +++++++ tests/bugs1612/xmldefs/ConcreteWorld.aj | 5 +++ tests/bugs1612/xmldefs/Hello.java | 16 ++++++++++ tests/bugs1612/xmldefs/Hello2.java | 16 ++++++++++ tests/bugs1612/xmldefs/Hello3.class | Bin 0 -> 802 bytes tests/bugs1612/xmldefs/Hello3.java | 17 ++++++++++ tests/bugs1612/xmldefs/JavaHelper.java | 40 ++++++++++++++++++++++++ tests/bugs1612/xmldefs/JavaHelper2.java | 8 +++++ tests/bugs1612/xmldefs/World.aj | 24 ++++++++++++++ tests/bugs1612/xmldefs/WorldAt.java | 10 ++++++ tests/bugs1612/xmldefs/aop.xml | 13 ++++++++ tests/bugs1612/xmldefs/aop10.xml | 14 +++++++++ tests/bugs1612/xmldefs/aop11.xml | 14 +++++++++ tests/bugs1612/xmldefs/aop12.xml | 14 +++++++++ tests/bugs1612/xmldefs/aop13.xml | 13 ++++++++ tests/bugs1612/xmldefs/aop2.xml | 13 ++++++++ tests/bugs1612/xmldefs/aop3.xml | 13 ++++++++ tests/bugs1612/xmldefs/aop4.xml | 13 ++++++++ tests/bugs1612/xmldefs/aop5.xml | 14 +++++++++ tests/bugs1612/xmldefs/aop6.xml | 15 +++++++++ tests/bugs1612/xmldefs/aop7.xml | 15 +++++++++ tests/bugs1612/xmldefs/aop8.xml | 15 +++++++++ tests/bugs1612/xmldefs/aop9.xml | 14 +++++++++ 24 files changed, 343 insertions(+) create mode 100644 tests/bugs1612/xmldefs/A.java create mode 100644 tests/bugs1612/xmldefs/C.java create mode 100644 tests/bugs1612/xmldefs/ConcreteWorld.aj create mode 100644 tests/bugs1612/xmldefs/Hello.java create mode 100644 tests/bugs1612/xmldefs/Hello2.java create mode 100644 tests/bugs1612/xmldefs/Hello3.class create mode 100644 tests/bugs1612/xmldefs/Hello3.java create mode 100644 tests/bugs1612/xmldefs/JavaHelper.java create mode 100644 tests/bugs1612/xmldefs/JavaHelper2.java create mode 100644 tests/bugs1612/xmldefs/World.aj create mode 100644 tests/bugs1612/xmldefs/WorldAt.java create mode 100644 tests/bugs1612/xmldefs/aop.xml create mode 100644 tests/bugs1612/xmldefs/aop10.xml create mode 100644 tests/bugs1612/xmldefs/aop11.xml create mode 100644 tests/bugs1612/xmldefs/aop12.xml create mode 100644 tests/bugs1612/xmldefs/aop13.xml create mode 100644 tests/bugs1612/xmldefs/aop2.xml create mode 100644 tests/bugs1612/xmldefs/aop3.xml create mode 100644 tests/bugs1612/xmldefs/aop4.xml create mode 100644 tests/bugs1612/xmldefs/aop5.xml create mode 100644 tests/bugs1612/xmldefs/aop6.xml create mode 100644 tests/bugs1612/xmldefs/aop7.xml create mode 100644 tests/bugs1612/xmldefs/aop8.xml create mode 100644 tests/bugs1612/xmldefs/aop9.xml diff --git a/tests/bugs1612/xmldefs/A.java b/tests/bugs1612/xmldefs/A.java new file mode 100644 index 000000000..fd94e0a30 --- /dev/null +++ b/tests/bugs1612/xmldefs/A.java @@ -0,0 +1,16 @@ +import org.aspectj.lang.annotation.*; + + abstract aspect X { + void around(): execution(* foo(..)) {} +} + + +@Aspect class B extends X { } + +public class A { + public void foo() { } + +public static void main(String []argv) { + new A().foo(); +} +} diff --git a/tests/bugs1612/xmldefs/C.java b/tests/bugs1612/xmldefs/C.java new file mode 100644 index 000000000..4028ee27a --- /dev/null +++ b/tests/bugs1612/xmldefs/C.java @@ -0,0 +1,11 @@ +import org.aspectj.lang.annotation.*; +import org.aspectj.lang.*; + +@Aspect +public class C { + @Around("execution(* say2(..)) && args(w)") + public int m(ProceedingJoinPoint pjp,String w) { + pjp.proceed(new Object[]{"abc"}); + return 1; + } +} diff --git a/tests/bugs1612/xmldefs/ConcreteWorld.aj b/tests/bugs1612/xmldefs/ConcreteWorld.aj new file mode 100644 index 000000000..cb1716509 --- /dev/null +++ b/tests/bugs1612/xmldefs/ConcreteWorld.aj @@ -0,0 +1,5 @@ +public aspect ConcreteWorld extends World { + pointcut greeting() : + execution(* Hello.sayWorld(..)) + || execution(* Hello.sayHello(..)); +} diff --git a/tests/bugs1612/xmldefs/Hello.java b/tests/bugs1612/xmldefs/Hello.java new file mode 100644 index 000000000..833ee1d3e --- /dev/null +++ b/tests/bugs1612/xmldefs/Hello.java @@ -0,0 +1,16 @@ +public class Hello { + + public static void main(String[] args) { + sayHello(); + } + + public static void sayHello() { + System.out.println("Hello"); + sayWorld(); + } + + public static int sayWorld() { + System.out.println("World"); + return 0; + } +} diff --git a/tests/bugs1612/xmldefs/Hello2.java b/tests/bugs1612/xmldefs/Hello2.java new file mode 100644 index 000000000..92b4dd834 --- /dev/null +++ b/tests/bugs1612/xmldefs/Hello2.java @@ -0,0 +1,16 @@ +public class Hello2 { + + public static void main(String[] args) { + say1("hello"); + } + + public static void say1(String h) { + System.out.println(h); + say2("world"); + } + + public static int say2(String w) { + System.out.println(w); + return 0; + } +} diff --git a/tests/bugs1612/xmldefs/Hello3.class b/tests/bugs1612/xmldefs/Hello3.class new file mode 100644 index 0000000000000000000000000000000000000000..543f998d11545711127248562cf12debccd9e2b0 GIT binary patch literal 802 zcma)4+iuf96r4>Q+u68DF-^m*Pzt0@N*kKOQ-KGN5E2m}1tB4xoMtJme2H8K)V~5A z(h4L#fR94V#z9djNW{us=A1KUc6NXK{Q4b07xyG;xME{PqKd0!T*Iowb*$OAp^=*w zZb{fWqp9b0J$N=+7TOjz1kC$E9Apm#ieBrrfblpPDuG%rh}H9PG*Ia)e-IKeB0q=) zmc6&V1OJ2H3H^A#)6dc%-rt=T9{NYy0(I}-;jTdQZ{f2Q0?Vh(7h{9RTw5a zTe`7>MVu2Tz1NU~Wi%|@cCd*p3mpe{&|vUml7>SE7jRLa@u%EJ;~*TWls(?1NwiAc z-3Jb~(RHwcy8@soc|(E4dGU+Ef!fPXLH(n{OhvRV88cAN&k-b@mvkkgH_DH81_LQ`b1_RMRb-pg7N!C=fMJ;#bzUFw1|2;xw}U1x9;T&Z8_M2mrT{%HzgZ~K}hUbJX$-uX1k!}GJO;otz4bF(0q}4*?Z{med+~vY^F;&*q Kh+HCGz~x_Eg`fxk literal 0 HcmV?d00001 diff --git a/tests/bugs1612/xmldefs/Hello3.java b/tests/bugs1612/xmldefs/Hello3.java new file mode 100644 index 000000000..8f5190ec0 --- /dev/null +++ b/tests/bugs1612/xmldefs/Hello3.java @@ -0,0 +1,17 @@ +public class Hello3 { + + public static void main(String[] args) { + say1("hello"); + } + + public static void say1(String h) { + System.out.println(h); + String s = say2("world"); + System.out.println("from say2="+s); + } + + public static String say2(String w) { + System.out.println(w); + return ""; + } +} diff --git a/tests/bugs1612/xmldefs/JavaHelper.java b/tests/bugs1612/xmldefs/JavaHelper.java new file mode 100644 index 000000000..3dee77d8b --- /dev/null +++ b/tests/bugs1612/xmldefs/JavaHelper.java @@ -0,0 +1,40 @@ +public class JavaHelper { + public static void advice1() { + System.out.println("in advice"); + } + public static void advice2(String s) { + System.out.println("in advice: s="+s); + } + public static void advice3(String s) { + System.out.println("in advice3: s="+s); + } + public static void advice4(org.aspectj.lang.JoinPoint tjp, String s) { + System.out.println("in advice4: s="+s+" at "+tjp); + } + public static void advice5(org.aspectj.lang.JoinPoint tjp, String s) { + System.out.println("in advice5: s="+s+" at "+tjp); + } + public static void advice6(org.aspectj.lang.JoinPoint.StaticPart tjp, String s) { + System.out.println("in advice6: s="+s+" at "+tjp); + } + public static void advice7(org.aspectj.lang.JoinPoint.StaticPart tjp, String s) { + System.out.println("in advice7: s="+s+" at "+tjp); + } + public static void around1(org.aspectj.lang.JoinPoint.StaticPart tjp, String s) { + System.out.println("in around advice: s="+s+" at "+tjp); + } + public static int around2(org.aspectj.lang.JoinPoint.StaticPart tjp, String s) { + System.out.println("in around2 advice: s="+s+" at "+tjp); + return 99; + } + public static int around3(org.aspectj.lang.ProceedingJoinPoint pjp, String s) { + pjp.proceed(new Object[]{"abcde"}); + return 42; + } + public static String around4(org.aspectj.lang.ProceedingJoinPoint pjp, String s) { + System.out.println("around4 running"); + pjp.proceed(new Object[]{"abcde"}); + return "xyz"; + } +} + diff --git a/tests/bugs1612/xmldefs/JavaHelper2.java b/tests/bugs1612/xmldefs/JavaHelper2.java new file mode 100644 index 000000000..7e2b10d2f --- /dev/null +++ b/tests/bugs1612/xmldefs/JavaHelper2.java @@ -0,0 +1,8 @@ +package a.bb.ccc; + +public class JavaHelper2 { + public static void advice1() { + System.out.println("in advice"); + } +} + diff --git a/tests/bugs1612/xmldefs/World.aj b/tests/bugs1612/xmldefs/World.aj new file mode 100644 index 000000000..ac3fd5cc6 --- /dev/null +++ b/tests/bugs1612/xmldefs/World.aj @@ -0,0 +1,24 @@ +import org.aspectj.lang.Signature; +import org.aspectj.lang.JoinPoint; +public abstract aspect World { + //private Object result; + pointcut greeting() : execution(* Hello.sayWorld(..)); + + Object around(): greeting() { + System.out.println("around start!"); + Object result = proceed(); + System.out.println("around end!"); + return result; + } + +// before() : greeting() { +// Signature signature = thisJoinPoint.getSignature(); +// System.out.println("before " + signature.getName()); +// } + +// after() returning () : greeting() { +// Signature signature = thisJoinPoint.getSignature(); +// System.out.println("after " + signature.getName()); +// } + +} diff --git a/tests/bugs1612/xmldefs/WorldAt.java b/tests/bugs1612/xmldefs/WorldAt.java new file mode 100644 index 000000000..1d142de59 --- /dev/null +++ b/tests/bugs1612/xmldefs/WorldAt.java @@ -0,0 +1,10 @@ +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; + +@Aspect +public abstract class WorldAt { + + @Pointcut("execution(* Hello.sayWorld(..))") + void greeting() {} + +} diff --git a/tests/bugs1612/xmldefs/aop.xml b/tests/bugs1612/xmldefs/aop.xml new file mode 100644 index 000000000..76b8da9e1 --- /dev/null +++ b/tests/bugs1612/xmldefs/aop.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/tests/bugs1612/xmldefs/aop10.xml b/tests/bugs1612/xmldefs/aop10.xml new file mode 100644 index 000000000..c6f90bcd2 --- /dev/null +++ b/tests/bugs1612/xmldefs/aop10.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/tests/bugs1612/xmldefs/aop11.xml b/tests/bugs1612/xmldefs/aop11.xml new file mode 100644 index 000000000..fa9b0aa82 --- /dev/null +++ b/tests/bugs1612/xmldefs/aop11.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/tests/bugs1612/xmldefs/aop12.xml b/tests/bugs1612/xmldefs/aop12.xml new file mode 100644 index 000000000..89c58f7f5 --- /dev/null +++ b/tests/bugs1612/xmldefs/aop12.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/tests/bugs1612/xmldefs/aop13.xml b/tests/bugs1612/xmldefs/aop13.xml new file mode 100644 index 000000000..98ef2783e --- /dev/null +++ b/tests/bugs1612/xmldefs/aop13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/tests/bugs1612/xmldefs/aop2.xml b/tests/bugs1612/xmldefs/aop2.xml new file mode 100644 index 000000000..5dfab3cb8 --- /dev/null +++ b/tests/bugs1612/xmldefs/aop2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/tests/bugs1612/xmldefs/aop3.xml b/tests/bugs1612/xmldefs/aop3.xml new file mode 100644 index 000000000..3a9a65e39 --- /dev/null +++ b/tests/bugs1612/xmldefs/aop3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/tests/bugs1612/xmldefs/aop4.xml b/tests/bugs1612/xmldefs/aop4.xml new file mode 100644 index 000000000..80f30d081 --- /dev/null +++ b/tests/bugs1612/xmldefs/aop4.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/tests/bugs1612/xmldefs/aop5.xml b/tests/bugs1612/xmldefs/aop5.xml new file mode 100644 index 000000000..655bd5578 --- /dev/null +++ b/tests/bugs1612/xmldefs/aop5.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/tests/bugs1612/xmldefs/aop6.xml b/tests/bugs1612/xmldefs/aop6.xml new file mode 100644 index 000000000..870767464 --- /dev/null +++ b/tests/bugs1612/xmldefs/aop6.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/tests/bugs1612/xmldefs/aop7.xml b/tests/bugs1612/xmldefs/aop7.xml new file mode 100644 index 000000000..7d1852d5e --- /dev/null +++ b/tests/bugs1612/xmldefs/aop7.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/tests/bugs1612/xmldefs/aop8.xml b/tests/bugs1612/xmldefs/aop8.xml new file mode 100644 index 000000000..890bfc5e1 --- /dev/null +++ b/tests/bugs1612/xmldefs/aop8.xml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/tests/bugs1612/xmldefs/aop9.xml b/tests/bugs1612/xmldefs/aop9.xml new file mode 100644 index 000000000..6ec4af59b --- /dev/null +++ b/tests/bugs1612/xmldefs/aop9.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + -- 2.39.5