[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ajdt-dev] Unexpected behaviour when using Ajdt and recursive functions
|
This appears to be a bug. I raised it here:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=235204
On Mon, Jun 2, 2008 at 11:21 AM, myskin83@xxxxxxxxx <myskin83@xxxxxxxxx> wrote:
> Hello everybody,
> I'm using ajdt 1.5 and Eclipse 3.3.2.
> Consider this
> scenario: I defined a class RecursiveCalls that has a recursive method inside
> (here is the code) :
>
> 1package recursivepackage;
> 2
> 3public class RecursiveCalls
> {
> 4
> 5
> 6 public void recursiveCall(int i){
> 7 if(i==0) return;
> 8 recursiveCall
> (i-1);
> 9 }
> 10
> 11
> 12 public void notRecursive(int i){
> 13 recursiveCall(5);
> 14
> }
> 15}
>
> I define an aspect with a pointcut and an advice to catch up all the
> calls (recursive or not) to the recursiveCall method, in this way.
>
>
> package
> recursivepackage;
>
> public aspect RecursionCatcher {
>
> pointcut recur() : call
> (public void RecursiveCalls.recursiveCall(int));
>
>
> before(): recur() {
>
> //do what is needed-not interesting here
> }
>
> }
>
> The editor correctly signals
> me the advice relation between line 13 of the class and the before advice.
> However, for the recursiveCall method the advice relation is between line 6 and
> the advice. I expected it to be between line 8 and the advice. Line 6 should be
> present in the case of an execution () pointcut, not a call() one. Am I wrong
> or is this an incorrect behaviour? Let me know.
>
> _______________________________________________
> ajdt-dev mailing list
> ajdt-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ajdt-dev
>