]> source.dussan.org Git - aspectj.git/commitdiff
285172: use cached ref type
authoraclement <aclement>
Thu, 30 Jul 2009 15:29:40 +0000 (15:29 +0000)
committeraclement <aclement>
Thu, 30 Jul 2009 15:29:40 +0000 (15:29 +0000)
org.aspectj.matcher/src/org/aspectj/weaver/World.java

index 9e1186904504d9ed6e34a1428cb82c6c78d21250..92666c15e4b2edb58fae10c389591fd129c6a048 100644 (file)
@@ -285,10 +285,16 @@ public abstract class World implements Dump.INode {
                }
 
                // Pulling in the type may have already put the right entry in the map
-               if (typeMap.get(signature) == null && !ret.isMissing()) {
+               ResolvedType result = typeMap.get(signature);
+               if (result == null && !ret.isMissing()) {
                        typeMap.put(signature, ret);
+                       return ret;
+               }
+               if (result == null) {
+                       return ret;
+               } else {
+                       return result;
                }
-               return ret;
        }
 
        /**