選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

NamedWithinPointcuts.java 562B

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. }