Summary: | VerifyError : Declare parents does not properly rewrite super constructor call, since 1.6.4 present in 1.6.5 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Simone Gianni <simoneg> | ||||
Component: | Compiler | Assignee: | aspectj inbox <aspectj-inbox> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | major | ||||||
Priority: | P2 | CC: | aclement | ||||
Version: | DEVELOPMENT | ||||||
Target Milestone: | 1.6.6 | ||||||
Hardware: | PC | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Simone Gianni
2009-09-22 00:04:42 EDT
Created attachment 147756 [details]
Two projects that combined together as explained cause the error
My current output from javap is : Compiled from "BeanChild.java" public class oaj.test.BeanChild extends oaj.test.InterfaceParent SourceFile: "BeanChild.java" org.aspectj.weaver.WeaverVersion: length = 0xC [......] { public oaj.test.BeanChild(java.lang.Class); Signature: length = 0x2 00 08 org.aspectj.weaver.MethodDeclarationLineNumber: length = 0x8 00 00 00 05 00 00 00 51 Code: Stack=2, Locals=2, Args_size=2 0: aload_0 1: aload_1 2: invokespecial #11; //Method oaj/test/GenericParent."<init>":(Ljava/lang/Class;)V 5: return LocalVariableTable: Start Length Slot Name Signature 0 6 0 this Loaj/test/BeanChild; 0 6 1 c Ljava/lang/Class; LineNumberTable: line 6: 0 line 7: 5 } As you can see, oaj.test.BeanChild extends oaj.test.InterfaceParent but at opcode 2 it invokes GenericParent.<init> instead of InterfaceParent.<init> interesting. I did make changes in the super rewrite code in that timeframe, I guess we had no testcases for this kind of scenario so my change addressed the problem i was facing but broke this case. fix committed. The rewriter for supers did not go from the parameterized type to the generic type so failed to recognize there was a super to rewrite. Now it dereferences to the generic type and successfully manages a rewrite. |