[aspectc-user] Simple code cause StackOverflowError

Peer Haja peerhaja at yahoo.com
Fri Mar 7 00:35:36 CET 2003


All, 

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/



More information about the aspectc-user mailing list