]> source.dussan.org Git - aspectj.git/commitdiff
174385: testcode, almost working
authoraclement <aclement>
Tue, 10 Jun 2008 03:29:06 +0000 (03:29 +0000)
committeraclement <aclement>
Tue, 10 Jun 2008 03:29:06 +0000 (03:29 +0000)
tests/bugs161/pr174385/StaticFinalStringInPointcutAspect.java [new file with mode: 0644]

diff --git a/tests/bugs161/pr174385/StaticFinalStringInPointcutAspect.java b/tests/bugs161/pr174385/StaticFinalStringInPointcutAspect.java
new file mode 100644 (file)
index 0000000..af15cbf
--- /dev/null
@@ -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();
+               }
+}