From: aclement Date: Wed, 9 Nov 2005 15:46:08 +0000 (+0000) Subject: fixes for 91859 - enable us to preserve the set of annotations originally declared... X-Git-Tag: V1_5_0RC1~213 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9af74082a57c07fc22f9cba3bb4601b5b78674aa;p=aspectj.git fixes for 91859 - enable us to preserve the set of annotations originally declared on a type so they can be put in the class file and we don't include ones added via declare @type during 'source weaving' --- diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java index cb5d706e1..e743af75e 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java @@ -782,9 +782,10 @@ public class AjLookupEnvironment extends LookupEnvironment implements AnonymousC } // Build a new array of annotations - // FIXME asc Should be caching the old set of annotations in the type so the class file - // generated doesn't have the annotation, it will then be added again during - // binary weaving? (similar to declare parents handling...) + + // remember the current set (rememberAnnotations only does something the first time it is called for a type) + sourceType.scope.referenceContext.rememberAnnotations(); + AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decA.getSourceLocation(),rtx.getSourceLocation()); Annotation abefore[] = sourceType.scope.referenceContext.annotations; Annotation[] newset = new Annotation[toAdd.length+(abefore==null?0:abefore.length)];