]> source.dussan.org Git - aspectj.git/commitdiff
286375: test and fix: recursive decl npe
authoraclement <aclement>
Fri, 4 Sep 2009 20:51:55 +0000 (20:51 +0000)
committeraclement <aclement>
Fri, 4 Sep 2009 20:51:55 +0000 (20:51 +0000)
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java
org.aspectj.matcher/src/org/aspectj/weaver/World.java

index f1f67795556c0452e4cd85650010df0a082b11f4..bad61e2bd0e1ab23d476830d3190a3f22096758d 100644 (file)
@@ -80,6 +80,10 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl
 
        public abstract ResolvedMember[] getDeclaredPointcuts();
 
+       public boolean isCacheable() {
+               return true;
+       }
+
        /**
         * Returns a ResolvedType object representing the superclass of this type, or null. If this represents a java.lang.Object, a
         * primitive type, or void, this method returns null.
index 92666c15e4b2edb58fae10c389591fd129c6a048..f8fd2a310631ee5061cbb11bf76066f08e8539a4 100644 (file)
@@ -946,6 +946,9 @@ public abstract class World implements Dump.INode {
                 * generic type.
                 */
                public ResolvedType put(String key, ResolvedType type) {
+                       if (!type.isCacheable()) {
+                               return type;
+                       }
                        if (type.isParameterizedType() && type.isParameterizedWithTypeVariable()) {
                                if (debug)
                                        System.err