« Return to Thread: StackOverflow error

Re: StackOverflow error

by Holger Hoffstätte-2 :: Rate this Message:

Reply to Author | View in Thread

Jack Jill wrote:

> Andy,
> Your advice :) worked like a charm!
>
> Showing only relevant changes to code (RunMultipleAspect.java)
>
> *@After("execution(@com.xxxx.util.annotation.RunMultiple * *.*(..)) &&
> !within(RunMultipleAspect) && !cflow(adviceexecution())")*
> public void repeat(JoinPoint jp) throws ClassNotFoundException,
>             IllegalArgumentException, IllegalAccessException,
>             InvocationTargetException, InstantiationException {
>         ....
>         ....
> *         //        if (++count < rmAnnotation.counter()) {
[..snip..]

Hey :)

I quickly read through your example and was wondering if you couldn't just
use "around" to call proceed() n times in your loop. This should work the
same but without all the hand-made reflection stuff and (as far as I can
see?) no need for cflowbelow, no stack overflow etc. Would this work too?

Holger
_______________________________________________
aspectj-users mailing list
aspectj-users@...
https://dev.eclipse.org/mailman/listinfo/aspectj-users

 « Return to Thread: StackOverflow error