[aosd-discuss] Is return statement ignored in advice?

Mike Mortensen mmo at fc.hp.com
Fri Aug 17 12:50:36 EDT 2007


I'm wondering if you expected a 'return' in the advice to return
from the 'advised' method, but a return in the advice just exits
the advice and the method executes. 

If you want to change method execution, you have to create 'around advice'
and not call proceed...

Hopefully I correctly guessed your intention... :-)
-Mike


>I doubt that this is the case. If so, it's certainly a bug. I think
>you must be misinterpreting something. Can you give an example?
>
>Eric
>
>On 17/08/07, chuan Zhao <zhaoc at eecs.wsu.edu> wrote:
>  
>
>>Hi All,
>>
>>I found that in AspectJ, if I put a return statement in an advice, it will
>>not affect the execution of program. Is return just ignored in any advice? I
>>couldn't find any explanation in AspectJ documentation. Could anyone give
>>some answer to this?
>>
>>Thanks,
>>Chuan
>>
>>_______________________________________________
>>discuss mailing list    -    discuss at aosd.net
>>
>>To unsubscribe and change options, go to:
>>http://aosd.net/mailman/listinfo/discuss_aosd.net
>>
>>Check out the AOSD.net Wiki: http://aosd.net/wiki
>>
>>    
>>
>
>
>  
>




More information about the discuss mailing list