Joe,

 > * null safe toString(Object), returning "null" for a null argument

 

Doesn't String.valueOf do the same thing?
http://java.sun.com/javase/6/docs/api/java/lang/String.html#valueOf(java.lang.Object)

 

What about a toIdentityString(Object) instead?  Some of the nice properties of 
an identity string is that it is safe to call from multiple threads even on 
objects that are not thread safe (JComponent), won't deadlock if toString is 
synchronized (observed in logging), and won't build run away strings 
(nCopies(Integer.MAX_VALUE, "lookout").toString()).

 

Jason
                                          
_________________________________________________________________
Hotmail® has ever-growing storage! Don’t worry about storage limits.
http://windowslive.com/Tutorial/Hotmail/Storage?ocid=TXT_TAGLM_WL_HM_Tutorial_Storage_062009

Reply via email to