Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] error message: "can't determine precedence..."

As Alexandre Vasseur mentioned, the problem was with both advices on the same aspect, so declare precedence wouldn't work. After trying to reproduce the error on other tests, I got to the conclusion that it must have been a typo or some other small error that I couldn't see, so I simply re-wrote the aspect from scratch...and that did it!

By the way, the before advice now comes first, then the around advice and then an after-returning advice, all applying to the same pointcuts.

Thanks for the support!

Alexandre Vasseur wrote:

As far as I understand, the 2 advices are in the same aspect.
Try having the before advice before the around advice in the source
code. Source code does matters when it comes to precedence between
advices defined in one aspect.

Alex

On 9/28/05, Eduardo Santos Cordeiro <cordeiro@xxxxxxxxxxx> wrote:
Hello everyone,

I am trying to compile a simple test in Eclipse 3.1 using the latest
build of AJDT for that version of Eclipse.

I have a "before" advice and an "around" advice that apply to the same
pointcut, and capture the same context (which is the integer argument of
a method). Whenever I remove one of them, the code compiles and the
other advice works correctly; when I try to compile the code with both,
I get the message "can't determine precedence between two or more pieces
of advice that apply to the same join point".

I sort of understand the precedence problem with that construction, but
how could I fix it? How could the precedence be resolved if both
pointcuts reside in the same aspect?

Regards,

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

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


Back to the top