@@ -0,0 +1,5 @@ | |||
package a; | |||
public class A { | |||
protected void m() { System.out.println("m() running");} | |||
} |
@@ -0,0 +1,19 @@ | |||
package b; | |||
public class B extends a.A { | |||
protected class Inner { | |||
public void foo() { | |||
System.out.println("calling m()"); | |||
m(); | |||
} | |||
} | |||
public static void main(String []argv) { | |||
B b = new B(); | |||
b.run(); | |||
} | |||
public void run() { | |||
new Inner().foo(); | |||
} | |||
} |
@@ -0,0 +1,3 @@ | |||
public aspect X { | |||
void around(): call(* m()) { System.out.println("advice running"); proceed();} | |||
} |
@@ -23,6 +23,7 @@ import org.aspectj.testing.XMLBasedAjcTestCase; | |||
public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase { | |||
// AspectJ1.6.1 | |||
public void testProtectedMethodsAroundAdvice_pr197719() { runTest("protected methods and around advice - again");} | |||
public void testProtectedMethodsAroundAdvice_pr230075() { runTest("protected methods and around advice");} | |||
public void testFinalStringsAnnotationPointcut_pr174385() { runTest("static strings in annotation pointcuts");} | |||
public void testComplexBoundsGenericAspect_pr199130_1() { runTest("complex bounds on generic aspect - 1");} |
@@ -3,6 +3,17 @@ | |||
<!-- AspectJ v1.6.1 Tests --> | |||
<suite> | |||
<ajc-test dir="bugs161/pr197719" title="protected methods and around advice - again"> | |||
<compile files="A.java B.java X.java" options="-1.5"/> | |||
<run class="b.B"> | |||
<stdout> | |||
<line text="calling m()"/> | |||
<line text="advice running"/> | |||
<line text="m() running"/> | |||
</stdout> | |||
</run> | |||
</ajc-test> | |||
<ajc-test dir="bugs161/pr230075" title="protected methods and around advice"> | |||
<compile files="A.java B.java C.java X.java" options="-1.5"/> | |||
<run class="a.C"/> |