aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2009-05-15 06:19:44 +0000
committeraclement <aclement>2009-05-15 06:19:44 +0000
commitbda8490282fbcf925368a53fa6a243307281a1d9 (patch)
treedbaffbdbc5e5e094f609d5bec007c750dccce7cb
parent506f9187da625a18bc135f9821881b05c53f1871 (diff)
downloadaspectj-bda8490282fbcf925368a53fa6a243307281a1d9.tar.gz
aspectj-bda8490282fbcf925368a53fa6a243307281a1d9.zip
276399: test and fix: annotation matching, default package and source folder
-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);
}
}