From 9eb61273fe9f7e1ebe4e4ef3bde4ed5bfd42886d Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 4 Sep 2009 20:51:55 +0000 Subject: [PATCH] 286375: test and fix: recursive decl npe --- org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java | 4 ++++ org.aspectj.matcher/src/org/aspectj/weaver/World.java | 3 +++ 2 files changed, 7 insertions(+) diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java index f1f677955..bad61e2bd 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java @@ -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. diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/World.java b/org.aspectj.matcher/src/org/aspectj/weaver/World.java index 92666c15e..f8fd2a310 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/World.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/World.java @@ -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 -- 2.39.5