aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2007-02-27 13:31:29 +0000
committeraclement <aclement>2007-02-27 13:31:29 +0000
commite253331f1e8d3f4aaba29f73fada1cdd1f72a314 (patch)
tree565ca464726d714ac2376f53654a4b98e50a1993
parent907dc1b73d052f9a0f95498b6ed5a92e0517cf65 (diff)
downloadaspectj-e253331f1e8d3f4aaba29f73fada1cdd1f72a314.tar.gz
aspectj-e253331f1e8d3f4aaba29f73fada1cdd1f72a314.zip
174449: generic aspects and generic pointcuts - dont ignore parameterized signatures for the advice method
-rw-r--r--tests/bugs160/pr174449/Foo.java33
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java2
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/ajc160.xml20
3 files changed, 55 insertions, 0 deletions
diff --git a/tests/bugs160/pr174449/Foo.java b/tests/bugs160/pr174449/Foo.java
new file mode 100644
index 000000000..68a400d7d
--- /dev/null
+++ b/tests/bugs160/pr174449/Foo.java
@@ -0,0 +1,33 @@
+abstract aspect Replicate<T> {
+
+ protected pointcut broadcast(T servant);
+
+ void around(T servant): broadcast(servant) {
+ System.err.println("around advice executing: servant class is "+servant.getClass());
+ proceed(servant);
+ }
+
+}
+
+aspect ReplicateConcreteB extends Replicate<Boo> {
+ protected pointcut broadcast(Boo servant) : call(* *.setScene(..)) && target(servant);
+}
+
+aspect ReplicateConcreteG extends Replicate<Goo> {
+ protected pointcut broadcast(Goo servant) : call(* *.setScene(..)) && target(servant);
+}
+
+public class Foo {
+ public static void main(String []argv) {
+ new Boo().setScene();
+ new Goo().setScene();
+ }
+}
+
+class Boo {
+ public void setScene() {}
+}
+
+class Goo {
+ public void setScene() {}
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
index e371e5e5e..0456efa11 100644
--- a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
@@ -21,6 +21,8 @@ import junit.framework.Test;
*/
public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testGenericAspectGenericPointcut_pr174449() { runTest("problem with generic aspect and generic pointcut");}
+ public void testGenericAspectGenericPointcut_noinline_pr174449() { runTest("problem with generic aspect and generic pointcut - noinline");}
public void testGenericMethodsAndOrdering_ok_pr171953_2() { runTest("problem with generic methods and ordering - ok");}
public void testGenericMethodsAndOrdering_bad_pr171953_2() { runTest("problem with generic methods and ordering - bad");}
public void testItdAndJoinpointSignatureCollection_ok_pr171953() { runTest("problem with itd and join point signature collection - ok");}
diff --git a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
index 671f3ad6d..128e18a03 100644
--- a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
+++ b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
@@ -5,6 +5,26 @@
<!-- first section - dont need a 1.6 vm but fixed in the 1.6 branch of AspectJ -->
+ <ajc-test dir="bugs160/pr174449" title="problem with generic aspect and generic pointcut">
+ <compile options="-1.5" files="Foo.java"/>
+ <run class="Foo">
+ <stderr>
+ <line text="around advice executing: servant class is class Boo"/>
+ <line text="around advice executing: servant class is class Goo"/>
+ </stderr>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs160/pr174449" title="problem with generic aspect and generic pointcut - noinline">
+ <compile options="-1.5 -XnoInline" files="Foo.java"/>
+ <run class="Foo">
+ <stderr>
+ <line text="around advice executing: servant class is class Boo"/>
+ <line text="around advice executing: servant class is class Goo"/>
+ </stderr>
+ </run>
+ </ajc-test>
+
<ajc-test dir="bugs160/pr171953_2" title="problem with generic methods and ordering - ok">
<compile options="-1.5" files="test/ListFactoryAspect.aj, test/AbstractProcessor.java,test/ListFactory.java,test/ListFactoryConsumer.java,test/Processor.java,test/SimpleListFactoryConsumer.java">
</compile>