aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs161/pr174385/StaticFinalStringInPointcutAspect.java
blob: af15cbf50d25ebf3ce48c917f3774cd2c5ac4ca4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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();
		}
}