From bda8490282fbcf925368a53fa6a243307281a1d9 Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 15 May 2009 06:19:44 +0000 Subject: [PATCH] 276399: test and fix: annotation matching, default package and source folder --- asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); } } -- 2.39.5