Attached is the trivial fix for issue 2827, changing String.valueOf(Object
x) to use x==null ? "null" : x.toString() rather than "" + x.  The issue
explains the background of the problem pretty well and an alternate (but not
likely soon) solution.

If we have another 1.5 release, I think this should probably go into it, but
I could be persuaded that it should go into trunk instead.

-- 
John A. Tamplin
Software Engineer (GWT), Google

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/Google-Web-Toolkit-Contributors
-~----------~----~----~----~------~----~------~--~---

Index: user/super/com/google/gwt/emul/java/lang/String.java
===================================================================
--- user/super/com/google/gwt/emul/java/lang/String.java	(revision 3582)
+++ user/super/com/google/gwt/emul/java/lang/String.java	(working copy)
@@ -206,7 +206,7 @@
   }
 
   public static String valueOf(Object x) {
-    return "" + x;
+    return x == null ? "null" : x.toString();
   }
 
   // CHECKSTYLE_OFF: This class has special needs.

Reply via email to