Bug 190095 - [matching] this(), target(), and args() etc. shouldn't allow the + wildcard
Summary: [matching] this(), target(), and args() etc. shouldn't allow the + wildcard
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (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: 2007-05-30 20:41 EDT by Ramnivas Laddad CLA
Modified: 2013-06-24 11:02 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 2007-05-30 20:41:44 EDT
Currently, no errors is issued when you use a pointcut expression such as target(java.util.List+). Per AspectJ language specification, these pointcuts take a Type or Id, so a TypePattern with a '+' should be flagged as error (the + is redundant in any case).
Comment 1 Andrew Clement CLA 2008-06-11 13:09:31 EDT
I'm concerned that if I make this an error then users code that used to work fine, and will continue to work fine, will now fail to compile.  I'm leaning to a warning, maybe even an xlint to advise them of it being unnecessary to include the '+'.  I just added the warning and 6 AspectJ tests triggered it (old ones)...
Comment 2 Ramnivas Laddad CLA 2008-06-11 15:37:43 EDT
I think issuing an xlint warning is a good idea.
Comment 3 Andrew Clement CLA 2013-06-24 11:02:37 EDT
unsetting the target field which is currently set for something already released