Bug 69344

Summary: Cannot exlude woven classes with scoping pointcut
Product: [Tools] AspectJ Reporter: Matthew Webster <matthew_webster>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 1.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Testcase none

Description Matthew Webster CLA 2004-07-06 05:41:16 EDT
When binary- or load-time weaving against a mixture of woven and non-woven 
class files a simple scoping pointcut e.g. !within() cannot be used to exclude 
woven classes and avoid a message similar to:

test\pointcut\inner\Main.java error class 'test.pointcut.inner.Main' is 
already woven and has not been built with -Xreweavable

It seems the test for a woven class file happens before pointcut evaluation. A 
similar problem occurs when trying to exlude classes that cannot be resolved.
Comment 1 Matthew Webster CLA 2004-07-06 05:43:25 EDT
Created attachment 12976 [details]
Testcase

Stand alone binary weaving testcase.
Comment 2 Adrian Colyer CLA 2004-07-30 17:14:51 EDT
Fix now available in latest build from AspectJ download page.
Comment 3 Andrew Clement CLA 2004-08-02 07:16:43 EDT
Adrian put that comment on the wrong bug.  69319 was fixed - so I'm reopening
this one.
Comment 4 Adrian Colyer CLA 2005-03-22 09:12:01 EST
this would be good to tidy up in M3...
Comment 5 Adrian Colyer CLA 2005-10-28 07:52:00 EDT
this would be a nice enhancement, but after investigation it is a lot of work and so will be pushed back to 
1.5.1
Comment 6 Matthew Webster CLA 2005-10-28 08:00:10 EDT
We might like to consider Ron's request at the same time 
http://dev.eclipse.org/mhonarc/lists/aspectj-dev/msg01894.html. Scoping 
pointcuts can be used to excluded classes that cannot be resolved. The aim is 
to make the weaver less aggressive (or greedy).
Comment 7 Andrew Clement CLA 2006-04-04 14:04:10 EDT
missed 1.5.1