aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2023-08-05 12:15:37 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2023-08-06 09:38:11 +0700
commitf44dc75e6b0e9a80b41dce7b43fa1a393a4a2adb (patch)
tree44f59d4f40a1b05001b05e02343832128ef8f390 /tests
parent8170ae6ffd7068a3f224de0df2008d74d6b9d35b (diff)
downloadaspectj-f44dc75e6b0e9a80b41dce7b43fa1a393a4a2adb.tar.gz
aspectj-f44dc75e6b0e9a80b41dce7b43fa1a393a4a2adb.zip
Fix inline accessor method bug in BcelAccessForInlineMunger
Make sure to create one ajc$inlineAccessMethod per identically named (overloaded) private aspect method in BcelAccessForInlineMunger.createOrGetInlineAccessorForMethod. Fixes #250. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'tests')
-rw-r--r--tests/java5/ataspectj/ataspectj/AroundInlineMungerTestAspects.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/java5/ataspectj/ataspectj/AroundInlineMungerTestAspects.java b/tests/java5/ataspectj/ataspectj/AroundInlineMungerTestAspects.java
index 8eb1dca07..baeac0f72 100644
--- a/tests/java5/ataspectj/ataspectj/AroundInlineMungerTestAspects.java
+++ b/tests/java5/ataspectj/ataspectj/AroundInlineMungerTestAspects.java
@@ -23,7 +23,9 @@ import org.aspectj.lang.ProceedingJoinPoint;
public class AroundInlineMungerTestAspects {
public static class OpenBase {
- protected void superMethod() {}
+ protected String superMethod(String s) {
+ return s;
+ }
}
public static class OpenSubBase extends OpenBase {}
@@ -43,7 +45,7 @@ public class AroundInlineMungerTestAspects {
public Object around1(ProceedingJoinPoint jp) throws Throwable {
aroundCount++;
priv(1, 2L, 3);
- super.superMethod();
+ super.superMethod("x");
new Open.Inner().priv();//fails to be wrapped so this advice will not be inlined but previous call were still prepared
return jp.proceed();
}
@@ -64,7 +66,7 @@ public class AroundInlineMungerTestAspects {
@SuppressAjWarnings
public Object around2(ProceedingJoinPoint jp) throws Throwable {
aroundCount++;
- super.superMethod();
+ super.superMethod("x");
new Open.Inner().priv();//fails to be wrapped so next calls won't be prepared but previous was
priv(1, 2L, 3);
return jp.proceed();