Community
Participate
Working Groups
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 Build Identifier: AspectJ Compiler 1.6.6 - Eclipse Compiler 0.785_R33x, 3.3 An AbstractMethodError is generated when inlined around advice from an abstract annotation-style aspect (annotation_style.AbstractAspect in the attached file `test_case.zip') tries to call an abstract method of the aspect (getValueReplacement()), which has been implemented in a concrete subclass of the aspect (annotation_style.ConcreteAspect). This problem does not occur in aspect-style aspects. Disassembling the two AbstractAspect classes shows different instructions used to call the abstract method (getValueReplacement()): invokespecial in the annotation-style aspect, and invokevirtual in the aspect-style aspect. This bug can be worked around by specifying the -XnoInline compiler option. More information is available in the README file in the attached file `test_case.zip'. Reproducible: Always Steps to Reproduce: 1. Download and extract the attached file `test_case.zip'. 2. At the command line, change to the directory of the extracted files. 3. Run `./run'. 4. To recompile with the -XnoInline compiler option, run `make clean; make AJCFLAGS=-XnoInline'. More information is available in the README file.
Created attachment 149801 [details] Test case to reproduce the bug, which includes README file with more details about the bug.
thanks for the great testcase! The problem is that in code style the modified eclipse compiler generates the accessor method (ajc$inlineAccessMethod$XXX), whilst in annotation style the weaver generates it. The compiler gets it right but the weaver gets it wrong. Changing the weaver to generate the right instruction fixes the testcase.