Bug 120372 - AspectJ cannot successfully weave CGLIB generated proxies in all cases.
Summary: AspectJ cannot successfully weave CGLIB generated proxies in all cases.
Status: REOPENED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.0M5   Edit
Hardware: PC Windows XP
: P5 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-12 10:31 EST by Andrew Clement CLA
Modified: 2009-08-30 02:49 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 Andrew Clement CLA 2005-12-12 10:31:38 EST
This bug is to track a problem found during debugging bug 117854.  We discovered that the code produced by cglib doesn't weave correctly if applying AspectJ after advice (or any AspectJ construct that is implemented via the 'after' mechanism - cflow/etc).  The cglib code generated *is* valid - but AspectJ makes an assumption about it that is not entirely valid (although the assumption holds for all code created by other tools we've seen: javac, the jdtcompiler, etc).

The workaround is to avoid weaving of CGLIB generated classes (identified by having CGLIB$$ in their name) - and this is probably correct for most users, as if they weave the proxies they are likely to get unpredictable results (advice running twice for example...)

The full discussion is in the referenced bug.

There is also a thread on the cglib mailing list where they would accept a patch to alter the generated code such that our assumption holds - I've just not had the time to do this.
Comment 1 Andrew Clement CLA 2006-02-15 05:30:52 EST
not doing any more on this right now - googling on aspectj/cglib will find this bug in the future if the problem crops up.
Comment 2 Oleksandr Alesinskyy CLA 2006-10-08 17:01:53 EDT
Googling on AspectJ/CGLIB has not found it for me (while 117854 was found)
Comment 3 Eclipse Webmaster CLA 2009-08-30 02:49:40 EDT
LATER/REMIND bugs are being automatically reopened as P5 because the LATER and REMIND resolutions are deprecated.