Bug 169015 - [plan] [ataspectj] Assymetry between AfterReturning/Throwing and other advice annotation
Summary: [plan] [ataspectj] Assymetry between AfterReturning/Throwing and other advice...
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Runtime (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-24 17:29 EST by Ramnivas Laddad CLA
Modified: 2013-06-24 11:06 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ramnivas Laddad CLA 2006-12-24 17:29:06 EST
Compared to other advice annotations, AfterReturning and AfterThrowing has an additional 'pointcut' property (that overrides the 'value' property). This is, IMO, unnecessary learning burden on users. This can be fixed in two ways:

1. (My preference -- one less thing to learn)
    Deprecate the 'pointcut' property eventually removing it. This should be 
    big burden on users since the change required is pretty trivial.
2. Add the 'pointcut' property to all advice annotations.
Comment 1 Ramnivas Laddad CLA 2006-12-24 20:00:47 EST
Correction:
This should be big burden --> This should not be big burden
Comment 2 Ramnivas Laddad CLA 2007-01-04 10:51:49 EST
Thinking more, I have even stronger preference for the first option 
(deprecate the "pointcut" attribute). 

It is not just other kind of advice, but none of the other constructs 
follow this kind of arrangement. For example, @DeclareParents doesn't 
specify "types" attribute (that would take precedence over "value"), 
nor we have "association" attribute for @Aspect. I think fewer 
attributes with the "value" attribute specifying the dominant property 
(expression for pointcut, pointcut for advice, types for declare parents, 
and association for aspect) of the construct is a simple to explain and 
easy to maintain approach.
Comment 3 Andrew Clement CLA 2013-06-24 11:06:05 EDT
unsetting the target field which is currently set for something already released