diff options
author | aclement <aclement> | 2004-07-28 14:43:40 +0000 |
---|---|---|
committer | aclement <aclement> | 2004-07-28 14:43:40 +0000 |
commit | 573741c8081c6b6b45921cafaae39f37eede2302 (patch) | |
tree | fae17176ce374ed0881cb10a8a161e39b3e18fbb /weaver | |
parent | c143eb5ec12a8ee9cf480e8bf4a4e12acef38d40 (diff) | |
download | aspectj-573741c8081c6b6b45921cafaae39f37eede2302.tar.gz aspectj-573741c8081c6b6b45921cafaae39f37eede2302.zip |
Fix for 64331
java.lang.NullPointerException in WeaverMessageHandler class
Diffstat (limited to 'weaver')
-rw-r--r-- | weaver/src/org/aspectj/weaver/ResolvedTypeX.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/weaver/src/org/aspectj/weaver/ResolvedTypeX.java b/weaver/src/org/aspectj/weaver/ResolvedTypeX.java index 16634af07..2779f7cdd 100644 --- a/weaver/src/org/aspectj/weaver/ResolvedTypeX.java +++ b/weaver/src/org/aspectj/weaver/ResolvedTypeX.java @@ -986,10 +986,17 @@ public abstract class ResolvedTypeX extends TypeX { for (Iterator iter = getInterTypeMungersIncludingSupers().iterator(); iter.hasNext();) { ConcreteTypeMunger element = (ConcreteTypeMunger) iter.next(); if (element.getSignature() != null && element.getSignature().isAbstract()) { + ISourceLocation xtraLocation = element.getSourceLocation(); + if (xtraLocation == null) { + // Until intertype mungers remember where they came from, the source location + // for the element is null when binary weaving. In these cases uses the + // source location for the aspect containing the ITD + xtraLocation = element.getAspectType().getSourceLocation(); + } world.getMessageHandler().handleMessage( new Message("must implement abstract inter-type declaration: " + element.getSignature(), "", IMessage.ERROR, getSourceLocation(), null, - new ISourceLocation[] { element.getSourceLocation() })); + new ISourceLocation[] { xtraLocation })); } } } |