镜像自地址
https://github.com/eclipse-aspectj/aspectj.git
已同步 2024-08-14 02:10:40 +02:00
23 行
562 B
Java
23 行
562 B
Java
|
|
import org.aspectj.testing.Tester;
|
|
|
|
public class NamedWithinPointcuts {
|
|
public static void main (String[] args) {
|
|
Tester.expectEvent("before");
|
|
Tester.checkAllEventsIgnoreDups();
|
|
}
|
|
}
|
|
|
|
aspect Test {
|
|
pointcut withinAspects() : within(Test) ;
|
|
|
|
static void log() { }
|
|
|
|
/** @testcase PR#635 Named Within pointcuts failing */
|
|
//before() : !within(Test) { // works fine
|
|
before() : !(withinAspects()) { // stack overflow
|
|
log(); // comment out to avoid stack overflow
|
|
Tester.event("before");
|
|
}
|
|
}
|