You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122
  1. import org.aspectj.testing.Tester;
  2. public class NamedWithinPointcuts {
  3. public static void main (String[] args) {
  4. Tester.expectEvent("before");
  5. Tester.checkAllEventsIgnoreDups();
  6. }
  7. }
  8. aspect Test {
  9. pointcut withinAspects() : within(Test) ;
  10. static void log() { }
  11. /** @testcase PR#635 Named Within pointcuts failing */
  12. //before() : !within(Test) { // works fine
  13. before() : !(withinAspects()) { // stack overflow
  14. log(); // comment out to avoid stack overflow
  15. Tester.event("before");
  16. }
  17. }