summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2009-01-09 20:06:53 +0000
committeraclement <aclement>2009-01-09 20:06:53 +0000
commit86af20534d08197ca88e18f1563b27e366d5e6bc (patch)
treed31018978ef033ba7f19f9a16f83ba74a6a9245f
parent242fbc2fdfa1698cdea07b3f505f19c12c15a3be (diff)
downloadaspectj-86af20534d08197ca88e18f1563b27e366d5e6bc.tar.gz
aspectj-86af20534d08197ca88e18f1563b27e366d5e6bc.zip
260384: guards for npes that could occur due to other errors in the source
-rw-r--r--org.aspectj.matcher/src/org/aspectj/weaver/ResolvedType.java7
1 files 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()),