From 86af20534d08197ca88e18f1563b27e366d5e6bc Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 9 Jan 2009 20:06:53 +0000 Subject: [PATCH] 260384: guards for npes that could occur due to other errors in the source --- .../src/org/aspectj/weaver/ResolvedType.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java index e0c2e91ec..266f829aa 100644 --- a/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java +++ b/org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java @@ -506,8 +506,9 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl // System.err.println("looking for pointcuts " + this); for (Iterator i = getPointcuts(); i.hasNext();) { ResolvedPointcutDefinition f = (ResolvedPointcutDefinition) i.next(); - // System.err.println(f); - if (name.equals(f.getName())) { + // the resolvedpointcutdefinition can be null if there are other problems that + // prevented its resolution + if (f!=null && name.equals(f.getName())) { return f; } } @@ -1832,7 +1833,7 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl // System.err.println("looking at: " + inherited + " in " + this); // System.err.println(" " + inherited.isAbstract() + // " in " + this.isAbstract()); - if (inherited.isAbstract()) { + if (inherited!=null && inherited.isAbstract()) { if (!this.isAbstract()) { getWorld().showMessage(IMessage.ERROR, WeaverMessages.format(WeaverMessages.POINCUT_NOT_CONCRETE, inherited, this.getName()), -- 2.39.5