diff options
-rw-r--r-- | asm/src/org/aspectj/asm/IHierarchy.java | 5 | ||||
-rw-r--r-- | asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java | 2 |
2 files changed, 3 insertions, 4 deletions
diff --git a/asm/src/org/aspectj/asm/IHierarchy.java b/asm/src/org/aspectj/asm/IHierarchy.java index 740c8f772..e1f3dded9 100644 --- a/asm/src/org/aspectj/asm/IHierarchy.java +++ b/asm/src/org/aspectj/asm/IHierarchy.java @@ -43,11 +43,10 @@ public interface IHierarchy extends Serializable { public boolean isValid(); - /** - * @return null if not found - */ public IProgramElement findElementForHandle(String handle); + public IProgramElement findElementForHandleOrCreate(String handle, boolean create); + /** * Returns the first match * diff --git a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java index 089938674..5443e759f 100644 --- a/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java +++ b/asm/src/org/aspectj/asm/internal/AspectJElementHierarchy.java @@ -422,7 +422,7 @@ public class AspectJElementHierarchy implements IHierarchy { // TODO: optimize this lookup // only want to create a file node if can't find the IPE if called through // findElementForHandle() to mirror behaviour before pr141730 - private IProgramElement findElementForHandleOrCreate(String handle, boolean create) { + public IProgramElement findElementForHandleOrCreate(String handle, boolean create) { // try the cache first... IProgramElement ipe = (IProgramElement) handleMap.get(handle); if (ipe != null) { |