]> source.dussan.org Git - aspectj.git/commitdiff
399408 fix
authorAndy Clement <andrew.clement@gmail.com>
Tue, 29 Jan 2013 17:20:10 +0000 (09:20 -0800)
committerAndy Clement <andrew.clement@gmail.com>
Tue, 29 Jan 2013 17:20:10 +0000 (09:20 -0800)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java

index 538057f9728aed0e3a8c7bfb8d516391c5c6245c..46a068660714dd474089f53da0ecc57733e6e49c 100644 (file)
@@ -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;
                }