Skip to main content

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

Thanks for the quick answer Andy.

I checked with -XnoInline and without it, and while the results change
(without the flag, a 2nd aspect is needed to obtain the wrong
behavior, while with the flag set it fails with both 1 and 2 extra
around aspects) it still doesn't show the expected behavior in all
cases.

On Tue, Jan 11, 2011 at 4:48 AM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
> sounds like an AspectJ bug - I saw that you had raised it but have had
> no time to investigate.  I believe inlining of around advice is turned
> off when there are multiple proceeds, but you could try compiling with
> -XnoInline to see if that makes any difference.
>
> Andy
>
> On 10 January 2011 14:11, Carlos Vara <bashflyng@xxxxxxxxx> wrote:
>> 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
>> _______________________________________________
>> 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