From bc71bf94320dbdba830261c0f115688d77a7592b Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 12 Dec 2008 17:13:03 +0000 Subject: [PATCH] 258653: test and fix --- .../weaver/model/AsmRelationshipProvider.java | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/weaver/src/org/aspectj/weaver/model/AsmRelationshipProvider.java b/weaver/src/org/aspectj/weaver/model/AsmRelationshipProvider.java index 94e881671..77e292e3c 100644 --- a/weaver/src/org/aspectj/weaver/model/AsmRelationshipProvider.java +++ b/weaver/src/org/aspectj/weaver/model/AsmRelationshipProvider.java @@ -433,14 +433,18 @@ public class AsmRelationshipProvider { if (shadow instanceof BcelShadow) { Member actualEnclosingMember = ((BcelShadow) shadow).getRealEnclosingCodeSignature(); - UnresolvedType type = enclosingMember.getDeclaringType(); - UnresolvedType actualType = actualEnclosingMember.getDeclaringType(); - - // if these are not the same, it is an ITD and we need to use the latter to lookup - if (type.equals(actualType)) { + if (actualEnclosingMember == null) { enclosingNode = lookupMember(model.getHierarchy(), shadow.getEnclosingType(), enclosingMember); } else { - enclosingNode = lookupMember(model.getHierarchy(), shadow.getEnclosingType(), actualEnclosingMember); + UnresolvedType type = enclosingMember.getDeclaringType(); + UnresolvedType actualType = actualEnclosingMember.getDeclaringType(); + + // if these are not the same, it is an ITD and we need to use the latter to lookup + if (type.equals(actualType)) { + enclosingNode = lookupMember(model.getHierarchy(), shadow.getEnclosingType(), enclosingMember); + } else { + enclosingNode = lookupMember(model.getHierarchy(), shadow.getEnclosingType(), actualEnclosingMember); + } } } else { enclosingNode = lookupMember(model.getHierarchy(), shadow.getEnclosingType(), enclosingMember); -- 2.39.5