From: aclement Date: Thu, 28 Apr 2011 20:00:30 +0000 (+0000) Subject: 328121 X-Git-Tag: V1_6_12M1~48 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ef6ced1071b44dd3f6cb3eb784f2925958d8ab42;p=aspectj.git 328121 --- diff --git a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java index d95fb5fbf..6019964c6 100644 --- a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java +++ b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java @@ -158,7 +158,7 @@ public class AspectJElementHierarchy implements IHierarchy { synchronized (this) { // Build a cache key and check the cache - StringBuffer keyb = (packageName == null) ? new StringBuffer() : new StringBuffer(packageName); + StringBuilder keyb = (packageName == null) ? new StringBuilder() : new StringBuilder(packageName); keyb.append(".").append(typeName); String key = keyb.toString(); IProgramElement cachedValue = typeMap.get(key); @@ -290,6 +290,15 @@ public class AspectJElementHierarchy implements IHierarchy { } for (IProgramElement classNode : nodes) { + if (!classNode.getKind().isType()) { + List kids = classNode.getChildren(); + if (kids != null && !kids.isEmpty()) { + IProgramElement node = findClassInNodes(kids, name, typeName); + if (node != null) { + return node; + } + } + } else { if (baseName.equals(classNode.getName())) { if (innerName == null) { return classNode; @@ -306,6 +315,7 @@ public class AspectJElementHierarchy implements IHierarchy { return node; } } + } } return null; }