Bug 197720

Summary: Generics in parent class removes markers from child classes
Product: [Tools] AspectJ Reporter: William Headrick <eclipse>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: critical    
Priority: P2 CC: aclement
Version: 1.5.3   
Target Milestone: 1.6.2   
Hardware: PC   
OS: Windows NT   
Whiteboard:
Attachments:
Description Flags
Test Project
none
Test Project none

Description William Headrick CLA 2007-07-24 18:03:53 EDT
Build ID: I20070625-1500

Steps To Reproduce:
When using Generics in the class declaration (e.g., "public class C1<T>"), extending classes (e.g., "public class C2<String>") that call the @AspectJ labeled methods don't have markers (or woven classes).

I will attach a jar file with an Eclipse project that will show the problem.
Comment 1 William Headrick CLA 2007-07-24 18:05:14 EDT
Created attachment 74512 [details]
Test Project

The files in this jar should show the problem... I marked the lines where I think there should be a marker (advice) with the comment "// Should be a marker here..."
Comment 2 William Headrick CLA 2007-07-24 18:05:17 EDT
Created attachment 74513 [details]
Test Project

The files in this jar should show the problem... I marked the lines where I think there should be a marker (advice) with the comment "// Should be a marker here..."
Comment 3 William Headrick CLA 2007-07-24 22:39:16 EDT
I forgot to say that if you remove all of the <...> from the code, all of the markers/advice is correct.  The problem only occurs with the use of Generics.
Comment 4 Andrew Clement CLA 2008-08-22 13:09:32 EDT
:( Wish I'd got to this bug sooner.  Quite serious.  I've now fixed it.  thanks for the clear test case.  Can't believe more people haven't hit it.

The problem was not deferring to the backing generic member to determine annotation matches when working with a parameterized method.