summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Clement <andrew.clement@gmail.com>2013-01-29 09:20:10 -0800
committerAndy Clement <andrew.clement@gmail.com>2013-01-29 09:20:10 -0800
commitd524403d64f7d5d8f84ddb3e91afa4e3b91fd958 (patch)
treec51380d5dfd34d5096ff0970eda44ef84d22a81a
parent59b8e77965f0b92d869b803706386d7c22aeb94c (diff)
downloadaspectj-d524403d64f7d5d8f84ddb3e91afa4e3b91fd958.tar.gz
aspectj-d524403d64f7d5d8f84ddb3e91afa4e3b91fd958.zip
399408 fix
-rw-r--r--org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/EclipseSourceType.java5
1 files 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;
}