Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Inconsistent behavior when calling ProceedingJoinPoint#proceed() more than once

Hi all,

I reported a bug related to this last week [1], but I just decided to
also check here in case I'm doing something wrong.

I have an around aspect that can call proceed() more than once. There
are 2 other aspects that may also be weaved into the same method calls
and that have less precedence. Both when compiling this code in the
command line with ajc or in eclipse as an AJDT project, I have noticed
that on the first call to proceed, all aspects get executed as
expected, but on subsequent calls, *sometimes* the execution chain
goes directly to the adviced method, ignoring the additional aspects.

To clarify the sometimes:
- When there is only 2 aspects (the one that calls proceed various
times and an extra one), everything runs as expected unless it is
compiled directly with ajc and the aspects are specified in aspectpath
(works correctly with AJDT and with the aspects in inpath).
- When there is 3 aspects (the one that calls proceed various times
and 2 extra ones), it consistently fails with AJDT and ajc.

Am I missing something here or is ajc producing faulty code in this scenario?

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=333274


Back to the top