From d524403d64f7d5d8f84ddb3e91afa4e3b91fd958 Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Tue, 29 Jan 2013 09:20:10 -0800 Subject: [PATCH] 399408 fix --- .../ajdt/internal/compiler/lookup/EclipseSourceType.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java index 538057f97..46a068660 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java @@ -673,10 +673,11 @@ public class EclipseSourceType extends AbstractReferenceTypeDelegate { * (RetentionPolicy, Target). */ public AnnotationAJ[] getAnnotations() { - if (annotations != null) { + int declarationAnnoCount = (declaration.annotations == null ? 0 : declaration.annotations.length); + if (annotations != null && annotations.length==declarationAnnoCount) { return annotations; // only do this once } - if (!annotationsFullyResolved) { + if (!annotationsFullyResolved || annotations.length!=declarationAnnoCount) { TypeDeclaration.resolveAnnotations(declaration.staticInitializerScope, declaration.annotations, binding); annotationsFullyResolved = true; } -- 2.39.5