Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 318241

Summary: declare parents with annotations and annotation values can cause problems
Product: [Tools] AspectJ Reporter: Andrew Clement <aclement>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P2    
Version: 1.6.9RC1   
Target Milestone: 1.6.9   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Andrew Clement CLA 2010-06-28 16:24:28 EDT
Issue found in a Roo project.  There is a problem if an annotation value is of this form:

Class<? extends Something> value()

and there are 2 kinds of aspect around.  The first is a declare parents matching on existence of an annotation, the second is making certain types extend 'Something'.

If the type specified for an annotation value hasn't yet been through declare parents that adds 'Something' then at the point the annotation is resolved to satisfy the other declare parents we will find a bounds violation.
Comment 1 Andrew Clement CLA 2010-06-28 19:46:14 EDT
we can avoid full annotation resolution to address this problem - we only need the annotation type name to check if the declare parents are matching, we don't need the values to also be resolved.  If we extended the syntax for declare parents to
Comment 2 Andrew Clement CLA 2010-06-28 19:46:57 EDT
... <rest of that comment> ... support matching on annotation values, we will have problems as we can't resolve annotation values that early. 

test and fix committed