]> source.dussan.org Git - aspectj.git/commitdiff
328121
authoraclement <aclement>
Thu, 28 Apr 2011 20:00:30 +0000 (20:00 +0000)
committeraclement <aclement>
Thu, 28 Apr 2011 20:00:30 +0000 (20:00 +0000)
asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java

index d95fb5fbf5af7ee38215bd060f5926ee72f0689f..6019964c6b4b767ce4d612533f210600793799b9 100644 (file)
@@ -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<IProgramElement> 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;
        }