]> source.dussan.org Git - aspectj.git/commitdiff
260384: guards for npes that could occur due to other errors in the source
authoraclement <aclement>
Fri, 9 Jan 2009 20:06:53 +0000 (20:06 +0000)
committeraclement <aclement>
Fri, 9 Jan 2009 20:06:53 +0000 (20:06 +0000)
org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java

index e0c2e91ecc1a6561efdbade11c55d5f8b97fa0aa..266f829aa3dd9c7d66d04472dee35abba441a318 100644 (file)
@@ -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()),