Bug 288577 - after() returning(Object o) : set() is not working
Summary: after() returning(Object o) : set() is not working
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-03 17:23 EDT by Simone Gianni CLA
Modified: 2009-09-03 17:23 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Simone Gianni CLA 2009-09-03 17:23:16 EDT
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2009010218 Gentoo Firefox/3.0.5
Build Identifier: 20090619-0625

While it is quite pointless to use a returning clause on an after advice on a set() pointcut, there are situations (the simplest one is tracing) where writing a single advice for a composed pointcut is quite handy, and the fact that "after returning" is not triggered for the set() pointcut creates an annoying corner case.

Moreover, documentation states that after() returning(Object o) works on methods returning void (and in fact it does), but there is no mention that it does not work for set(), so the average user will expect it to work, setting "o" (the returned Object) to null.

after() without the returning clause works as expected, and there is no other pointcut expression to capture the return value to write a generic advice that works also on set().

Reproducible: Always

Steps to Reproduce:
To specific steps.