réplica de
https://github.com/eclipse-aspectj/aspectj.git
synced 2024-09-03 17:56:34 +02:00
23 líneas
562 B
Java
23 líneas
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");
|
|
}
|
|
}
|