diff options
author | aclement <aclement> | 2005-04-07 10:04:13 +0000 |
---|---|---|
committer | aclement <aclement> | 2005-04-07 10:04:13 +0000 |
commit | c55a1db4b1eb66c0d8a59163d5e971703eaf59cb (patch) | |
tree | af1f31bd2a335d171744d33cd6f238284d133d20 | |
parent | d3a9088bfc312ce744551b1e89831fde0a681bcb (diff) | |
download | aspectj-c55a1db4b1eb66c0d8a59163d5e971703eaf59cb.tar.gz aspectj-c55a1db4b1eb66c0d8a59163d5e971703eaf59cb.zip |
Guard against NPE
-rw-r--r-- | asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java index ec48fdd5f..26bf3f4b0 100644 --- a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java +++ b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java @@ -136,7 +136,10 @@ public class AspectJElementHierarchy implements IHierarchy { if (packageName == null) { packageNode = root; } else { - for (Iterator it = root.getChildren().iterator(); it.hasNext(); ) { + if (root == null) return null; + List kids = root.getChildren(); + if (kids == null) return null; + for (Iterator it = kids.iterator(); it.hasNext(); ) { IProgramElement node = (IProgramElement)it.next(); if (packageName.equals(node.getName())) { packageNode = node; |