Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Sample code from the programmer guide causes infinite loop (StackOverflowError)

I have AspectJ installed. Running "ajc -version"
 gives:
   ajc version 1.0.6 (built Jul 24, 2002 6:21 PM PST)
 running on java 1.4.1-rc


The following code taken from the online programmer
 guide (Chapter 2) cause the StackOverflowError:

 public class Test {
   public static void main(String[] args) {
  	foo();
  }

  static void foo() {
 	goo();
  }

  static void goo() {
 	System.out.println("hi");
  }
 }

 aspect A {
 	pointcut fooPC() : execution(void Test.foo());
 	pointcut gooPC() : execution(void Test.goo());
 	pointcut printPC() : call(void
 java.io.PrintStream.println(String));

 	before() : printPC() {
 		System.out.println("Should occur");
 	}
 }

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/


Back to the top