diff options
author | Jayaprakash Arthanareeswaran | 2014-04-02 09:06:35 +0000 |
---|---|---|
committer | Jayaprakash Arthanareeswaran | 2014-04-02 12:29:29 +0000 |
commit | b254baac66bf2889dacf5067873dc414e39763d4 (patch) | |
tree | 2fdf7a1dd17c45db72623caecc57b7debf989055 /org.eclipse.jdt.compiler.apt | |
parent | d4d6b0243291019997a7d2e0c012e405a0f88778 (diff) | |
download | eclipse.jdt.core-b254baac66bf2889dacf5067873dc414e39763d4.tar.gz eclipse.jdt.core-b254baac66bf2889dacf5067873dc414e39763d4.tar.xz eclipse.jdt.core-b254baac66bf2889dacf5067873dc414e39763d4.zip |
Fix for Bug 425687 - Invalid annotation inference when 2 classes have
the same (simple) name
Diffstat (limited to 'org.eclipse.jdt.compiler.apt')
-rw-r--r-- | org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/AnnotationDiscoveryVisitor.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/AnnotationDiscoveryVisitor.java b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/AnnotationDiscoveryVisitor.java index 3eb2495fe1..e615708125 100644 --- a/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/AnnotationDiscoveryVisitor.java +++ b/org.eclipse.jdt.compiler.apt/src/org/eclipse/jdt/internal/compiler/apt/dispatch/AnnotationDiscoveryVisitor.java @@ -228,7 +228,10 @@ public class AnnotationDiscoveryVisitor extends ASTVisitor { if (length == 0) return; - ASTNode.resolveAnnotations(scope, annotations, currentBinding, true); + boolean old = scope.insideTypeAnnotation; + scope.insideTypeAnnotation = true; + ASTNode.resolveAnnotations(scope, annotations, currentBinding); + scope.insideTypeAnnotation = old; ElementImpl element = (ElementImpl) _factory.newElement(currentBinding); AnnotationBinding [] annotationBindings = element.getPackedAnnotationBindings(); // discovery is never in terms of repeating annotation. for (AnnotationBinding binding : annotationBindings) { |