Summary: | "declare parents" does not work with bytecode weaving | ||||||
---|---|---|---|---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Alessandro Di Bella <aldib> | ||||
Component: | Compiler | Assignee: | Andrew Clement <aclement> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P2 | ||||||
Version: | DEVELOPMENT | ||||||
Target Milestone: | 1.5.0RC1 | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Alessandro Di Bella
2005-10-13 09:44:09 EDT
Created attachment 28234 [details] test case Same as http://www.fuurou.org/downloads/aspectjtest.zip, I did not see the attachment option before fix available. i think I put that comment in the wrong bug - let me double check. something funny is going on. There is a bug, and I've fixed it - but I couldnt recreate it with the ANT build.xml as-is. When I run the ant script, I get the same output as you: [java] Is [class lib.C] subcass of [class weaved.SuperC]? false However, the reason it says 'false' is that this command: <java classname="weaved.SuperC"> <classpath> <path refid="aspectj.classpath"/> <pathelement path="${classes.dir}"/> <pathelement location="${dist.dir}/weaved-lib.jar"/> </classpath> </java> puts classes ahead of weaved-lib in order to find weaved.SuperC - and for some reason 'classes' still contains lib/A.class lib/B.class and lib/C.class - when they should have been deleted earlier. When the old version of lib/C.class is loaded from classes, it reports that its new parent isnt SuperC. The bug was incorrectly modifying super calls - we omitted the package name if the new parent was in a package which caused a hideous verifyerror. If you want to see the verifyerror, change the order in the task above to: <classpath> <path refid="aspectj.classpath"/> <pathelement location="${dist.dir}/weaved-lib.jar"/> <pathelement path="${classes.dir}"/> </classpath> I've put tests in the suite for this - but I'm not going to spend time debugging the ant any further. I've no idea why the javac task that is told to compile src/weaved/* also compiles src/lib/*... fix checked in. fix is available. |