diff options
Diffstat (limited to 'tests/base/test144/SuperStaticCallJoinPoint.java')
-rw-r--r-- | tests/base/test144/SuperStaticCallJoinPoint.java | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/base/test144/SuperStaticCallJoinPoint.java b/tests/base/test144/SuperStaticCallJoinPoint.java new file mode 100644 index 000000000..5d75b8955 --- /dev/null +++ b/tests/base/test144/SuperStaticCallJoinPoint.java @@ -0,0 +1,25 @@ +import org.aspectj.testing.Tester; + +class Sup { + static void m() {} +} + +public class SuperStaticCallJoinPoint extends Sup { + static boolean ran = false; + public static void main(String[] args) { + new SuperStaticCallJoinPoint().foo(); + Tester.check(ran, "didn't run advice"); + } + void foo() { + super.m(); + } + static void m() { + throw new RuntimeException(); + } +} + +aspect A { + before(): this(SuperStaticCallJoinPoint) && call(void Sup.m()) { + SuperStaticCallJoinPoint.ran = true; + } +} |