]> source.dussan.org Git - aspectj.git/commitdiff
220172: npe guard
authoraclement <aclement>
Mon, 25 Feb 2008 21:39:45 +0000 (21:39 +0000)
committeraclement <aclement>
Mon, 25 Feb 2008 21:39:45 +0000 (21:39 +0000)
weaver/src/org/aspectj/weaver/Shadow.java

index 26f021298764d76020bc49c9048f05f07534a68d..511b1622d823d2b9beb9010cb275944fabbb495e 100644 (file)
@@ -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("<<missing signature>>");
+       } else {
+               ResolvedMember rm = world.resolve(m);
+               if (rm==null) {
+                       sb.append("<<unresolvableMember:").append(m).append(">>");
+               } else {
+                       String genString = rm.toGenericString();
+                       if (genString==null) {
+                               sb.append("<<unableToGetGenericStringFor:").append(rm).append(">>");
+                       } else {
+                               sb.append(genString);
+                       }
+                       
+               }
+       }
+       sb.append(")");
+       return sb.toString();
+       // was: return getKind() + "(" + world.resolve(getSignature()).toGenericString() + ")";
     }
 
     /**