Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJayaprakash Arthanareeswaran2014-04-02 09:06:35 +0000
committerJayaprakash Arthanareeswaran2014-04-02 12:29:29 +0000
commitb254baac66bf2889dacf5067873dc414e39763d4 (patch)
tree2fdf7a1dd17c45db72623caecc57b7debf989055 /org.eclipse.jdt.compiler.apt
parentd4d6b0243291019997a7d2e0c012e405a0f88778 (diff)
downloadeclipse.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.java5
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) {

Back to the top