From: aclement Date: Mon, 25 Feb 2008 21:39:45 +0000 (+0000) Subject: 220172: npe guard X-Git-Tag: V1_6_0M2~28 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5beab0ec09f8ccc7cea9778ea3d77e5d03486f0c;p=aspectj.git 220172: npe guard --- diff --git a/weaver/src/org/aspectj/weaver/Shadow.java b/weaver/src/org/aspectj/weaver/Shadow.java index 26f021298..511b1622d 100644 --- a/weaver/src/org/aspectj/weaver/Shadow.java +++ b/weaver/src/org/aspectj/weaver/Shadow.java @@ -744,7 +744,29 @@ public abstract class Shadow { } public String toResolvedString(World world) { - return getKind() + "(" + world.resolve(getSignature()).toGenericString() + ")"; + StringBuffer sb = new StringBuffer(); + sb.append(getKind()); + sb.append("("); + Member m = getSignature(); + if (m==null) { + sb.append("<>"); + } else { + ResolvedMember rm = world.resolve(m); + if (rm==null) { + sb.append("<>"); + } else { + String genString = rm.toGenericString(); + if (genString==null) { + sb.append("<>"); + } else { + sb.append(genString); + } + + } + } + sb.append(")"); + return sb.toString(); + // was: return getKind() + "(" + world.resolve(getSignature()).toGenericString() + ")"; } /**