]> source.dussan.org Git - aspectj.git/commitdiff
220255: use the right signature for the annotation added
authoraclement <aclement>
Tue, 26 Feb 2008 01:01:16 +0000 (01:01 +0000)
committeraclement <aclement>
Tue, 26 Feb 2008 01:01:16 +0000 (01:01 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment.java

index f1ab14b948ed57a5cc65752a0438eb1cc70eb1e5..f0bfa557eba8925cd89c77cc537faa7455cacc12 100644 (file)
@@ -819,9 +819,10 @@ public class AjLookupEnvironment extends LookupEnvironment implements AnonymousC
                        // on the weaver type temporarily
                        ResolvedType theTargetType = factory.fromEclipse(sourceType);
                        TypeBinding theAnnotationType = toAdd[0].resolvedType;
-                       String name = new String(theAnnotationType.qualifiedPackageName())+"."+new String(theAnnotationType.sourceName());
                        String sig = new String(theAnnotationType.signature());
-                       if (theTargetType.hasAnnotation(UnresolvedType.forSignature(sig))) {
+                       UnresolvedType bcelAnnotationType = UnresolvedType.forSignature(sig);
+                       String name = bcelAnnotationType.getName();
+                       if (theTargetType.hasAnnotation(bcelAnnotationType)) {
                                CompilationAndWeavingContext.leavingPhase(tok);
                                return false;
                        }