--- /dev/null
+class CommonEntity {
+
+ public void add(CommonEntity ce) {}
+ public void remove(CommonEntity ce) {}
+
+}
+
+class ManageEntity {
+
+ ManageEntity(CommonEntity ce) {
+ }
+}
+
+
+abstract aspect Y {
+ abstract pointcut entityAccessor(CommonEntity entity);
+ before(CommonEntity entity): entityAccessor(entity) {}
+}
+
+
+aspect X extends Y {
+
+ public pointcut entityAccessor1(CommonEntity entity)
+ : (execution(* CommonEntity+.add*(CommonEntity+))
+ || (execution(* CommonEntity+.remove*(CommonEntity+))))
+ && within(CommonEntity+)
+ && args(entity) && if(entity != null);
+
+ public pointcut entityAccessor2(CommonEntity entity)
+ : execution(ManageEntity.new(CommonEntity+, ..))
+ && within(ManageEntity)
+ && args(entity, ..)
+ && if(entity != null);
+
+ public pointcut entityAccessor(CommonEntity entity)
+ : entityAccessor1(entity) || entityAccessor2(entity);
+
+
+}
+
+
--- /dev/null
+public class MissingLineNumbers {
+ public static void main(String []argv) {
+ new MissingLineNumbers().foo();
+ }
+
+ public void foo() {
+ System.err.println("hello");
+ System.err.println("world");
+ }
+}
+
+aspect X {
+ void around(): call(* foo(..)) {
+ new RuntimeException().printStackTrace();
+ }
+}
+
+
public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ // public void testMissingLineNumbersInStacktrace_pr145442() { runTest("missing line numbers in stacktrace");}
// public void testArgnamesAndJavac_pr148381() { runTest("argNames and javac");}
// public void testCFlowXMLAspectLTW_pr149096() { runTest("cflow xml concrete aspect"); }
+ public void testAmbiguousBinding_pr121805() { runTest("ambiguous binding");}
public void testGenericInheritanceDecp_pr150095() { runTest("generics, inheritance and decp");}
public void testIllegalStateException_pr148737() { runTest("illegalstateexception for non generic type");}
public void testAtajInheritance_pr149305_1() { runTest("ataj inheritance - 1");}
<compile files="Foo.java" options="-1.5"/>
</ajc-test>
- <ajc-test dir="bugs153/pr149322" title="can't find type on interface call 1">
+ <ajc-test dir="bugs153/pr121805" title="ambiguous binding">
+ <compile files="Complex.java"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs153/pr145442" title="missing line numbers in stacktrace">
+ <compile files="MissingLineNumbers.java"/>
+ <run class="MissingLineNumbers"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs153/pr149322" title="can't find type on interface call">
<compile files="Interface.java"/>
<compile
files="Missing.java"