@@ -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() {} | |||
} |
@@ -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");} |
@@ -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> |