aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
Diffstat (limited to 'asm')
-rw-r--r--asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
index a075caef2..5b4fed1f5 100644
--- a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
+++ b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java
@@ -210,6 +210,7 @@ public class AspectJElementHierarchy implements IHierarchy {
return Collections.EMPTY_LIST;
}
if (((IProgramElement) children.get(0)).getKind() == IProgramElement.Kind.SOURCE_FOLDER) {
+ String searchPackageName = (packagename == null ? "" : packagename); // default package means match on ""
// dealing with source folders
List matchingPackageNodes = new ArrayList();
for (Iterator iterator = children.iterator(); iterator.hasNext();) {
@@ -218,7 +219,7 @@ public class AspectJElementHierarchy implements IHierarchy {
for (Iterator iterator2 = possiblePackageNodes.iterator(); iterator2.hasNext();) {
IProgramElement possiblePackageNode = (IProgramElement) iterator2.next();
if (possiblePackageNode.getKind() == IProgramElement.Kind.PACKAGE) {
- if (possiblePackageNode.getName().equals(packagename)) {
+ if (possiblePackageNode.getName().equals(searchPackageName)) {
matchingPackageNodes.add(possiblePackageNode);
}
}