Bug 474165 - Annotation on introduced interface through declareparents causes AspectJ compiler error
Summary: Annotation on introduced interface through declareparents causes AspectJ comp...
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.8.6   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.8.7   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-03 13:50 EDT by Sebastian Montero CLA
Modified: 2015-08-11 13:25 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Montero CLA 2015-08-03 13:50:45 EDT
I'm using @DeclareParents to introduce an interface to certain entites. The problem is that when I add the following annotation @JsonView(View.Minimal.class) to the introduced interface, I get the following AspectJ compiler error:

org.aspectj.ajdt.internal.compiler.lookup.EclipseAnnotationConvertor$MissingImplementationException: Please raise an AspectJ bug.  AspectJ does not know how to convert this annotation value [View.Minimal.class]
	at org.aspectj.ajdt.internal.compiler.lookup.EclipseAnnotationConvertor.generateElementValueForNonConstantExpression(EclipseAnnotationConvertor.java:221)
	at org.aspectj.ajdt.internal.compiler.lookup.EclipseAnnotationConvertor.generateElementValue(EclipseAnnotationConvertor.java:129)
	at org.aspectj.ajdt.internal.compiler.lookup.EclipseAnnotationConvertor.generateAnnotation(EclipseAnnotationConvertor.java:100)
	at org.aspectj.ajdt.internal.compiler.lookup.EclipseAnnotationConvertor.convertEclipseAnnotation(EclipseAnnotationConvertor.java:58)
	at org.aspectj.ajdt.internal.compiler.lookup.EclipseResolvedMember.getAnnotations(EclipseResolvedMember.java:102)
	at org.aspectj.weaver.bcel.BcelTypeMunger.mungeMethodDelegate(BcelTypeMunger.java:1413)
	at org.aspectj.weaver.bcel.BcelTypeMunger.munge(BcelTypeMunger.java:112)
Comment 1 Andrew Clement CLA 2015-08-06 16:56:27 EDT
I was not able to recreate it using @DeclareParents but I used some code involving XhasMember which triggered the same "does not know how to convert" problem. My test and fix are now in. Just to note that @DeclareParents is kind of deprecated in favor of @DeclareMixin these days (but is still supported).
Comment 2 Sebastian Montero CLA 2015-08-11 13:25:29 EDT
(In reply to Andrew Clement from comment #1)
> I was not able to recreate it using @DeclareParents but I used some code
> involving XhasMember which triggered the same "does not know how to convert"
> problem. My test and fix are now in. Just to note that @DeclareParents is
> kind of deprecated in favor of @DeclareMixin these days (but is still
> supported).

Hi Andrew, thank you, how can I get hold of the fix? I'm using @DeclareParents because I'm developing with Spring, and @DeclareMixin is not supported