]> source.dussan.org Git - aspectj.git/commitdiff
318397: clear cache
authoraclement <aclement>
Wed, 30 Jun 2010 00:20:30 +0000 (00:20 +0000)
committeraclement <aclement>
Wed, 30 Jun 2010 00:20:30 +0000 (00:20 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java

index b2525bbcd0aa07768b490df3f6f55c1972be6510..4e1a5776979ab04d7306161ba7de765fef9ccea8 100644 (file)
@@ -593,7 +593,9 @@ public class EclipseSourceType extends AbstractReferenceTypeDelegate {
         * ResolvedType representations. This does not deeply resolve the annotations, it only does the type names.
         */
        private void ensureAnnotationTypesResolved() {
-               if (!annotationTypesAreResolved) {
+               // may need to re-resolve if new annotations have been added
+               int declarationAnnoCount = (declaration.annotations == null ? 0 : declaration.annotations.length);
+               if (!annotationTypesAreResolved || declarationAnnoCount != annotationTypes.length) {
                        Annotation[] as = declaration.annotations;
                        if (as == null) {
                                annotationTypes = ResolvedType.NONE;