From ef6ced1071b44dd3f6cb3eb784f2925958d8ab42 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 28 Apr 2011 20:00:30 +0000 Subject: [PATCH] 328121 --- .../asm/internal/AspectJElementHierarchy.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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; } -- 2.39.5