From 0f9681ba755a272e41fff04c8f57be985f0c9824 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 10 Jun 2008 03:29:06 +0000 Subject: [PATCH] 174385: testcode, almost working --- .../StaticFinalStringInPointcutAspect.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/bugs161/pr174385/StaticFinalStringInPointcutAspect.java diff --git a/tests/bugs161/pr174385/StaticFinalStringInPointcutAspect.java b/tests/bugs161/pr174385/StaticFinalStringInPointcutAspect.java new file mode 100644 index 000000000..af15cbf50 --- /dev/null +++ b/tests/bugs161/pr174385/StaticFinalStringInPointcutAspect.java @@ -0,0 +1,23 @@ +package bug; + +import org.aspectj.lang.annotation.*; + +@Aspect +public class StaticFinalStringInPointcutAspect { + static final String pcExpression = "within(*)"; + + @Pointcut(pcExpression) + public void pointcutThatUsesStaticFinalStringAsExpression() {} + + @Before("pointcutThatUsesStaticFinalStringAsExpression() && execution(* foo(..))") + public void m() { + System.out.println("advice"); + } + + public void foo() { + } + + public static void main(String[] args) { + new StaticFinalStringInPointcutAspect().foo(); + } +} -- 2.39.5