Bug 318241 - declare parents with annotations and annotation values can cause problems
Summary: declare parents with annotations and annotation values can cause problems
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.6.9RC1   Edit
Hardware: PC Windows 7
: P2 major (vote)
Target Milestone: 1.6.9   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-28 16:24 EDT by Andrew Clement CLA
Modified: 2010-06-28 19:46 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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