Bug 209019 - [ltw] Various problems with around advice, ltw and xml concretized aspects
Summary: [ltw] Various problems with around advice, ltw and xml concretized aspects
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 1.5.4   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-07 08:34 EST by Andrew Clement CLA
Modified: 2007-11-08 11:31 EST (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 2007-11-07 08:34:39 EST
See forums posts from Jean-Louis Pasturel.  From playing around with test programs derivative of what he posted I have seen two serious problems.  An NPE crash in the around advice (which can be worked by using -XnoInline) and an illegal access error when the advised location is unable to call the proceed advice in the aspect because it cannot see the method in the other package.

I will put the testcases into CVS for this first.
Comment 1 Andrew Clement CLA 2007-11-07 10:00:28 EST
All fixed and tests added.

The problem was that the superaspect was in code style and the subaspect was in annotation style.  Declaring a concrete aspect in XML causes us to generate an annotation style subaspect.

Around advice inlining is done differently depending on whether the advice is declared in a codestyle aspect or an annotation style aspect.  Unfortunately we were making the decision about what to do based on the concrete aspect type that was leading to the advice being applied, rather than which type declared the advice.  I have switched the decision to be based on which type declares the advice.

fix will be in a dev build shortly
Comment 2 Ron Bodkin CLA 2007-11-07 14:52:46 EST
Will this fix support annotation-style aspects that extend abstract code-style aspects in general? Glassbox uses code-style aspects to work with Java 1.4 but many Java 5+ users would like to extend them with annotation-style aspects...
Comment 3 Andrew Clement CLA 2007-11-08 03:33:16 EST
I see no reason why that should not work Ron - have you been having trouble with it??

Comment 4 Ron Bodkin CLA 2007-11-08 11:31:24 EST
Yes I did in past. I'll try with the latest build and see if it works as expected.