You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by John Yu <jo...@scioworks.com> on 2002/08/23 13:05:06 UTC

[lang] Proposed addition to ObjectUtils

This is useful in debug logging for comparing the "address" of the objects 
when the Object.toString() is overriden.

   static public String nativeToString(Object obj) {
     if(obj == null) {
       return "<null>"; // NOi18n
     }
     return obj.getClass().getName() + "@" + 
Integer.toHexString(System.identityHashCode(obj));
   }

Btw, for this kind of proposals/patches, should I submit an "feature 
request" or "patch" entry in Bugzilla instead?

-- 
John Yu                       Scioworks Technologies
e: john@scioworks.com         w: +(65) 873 5989
w: http://www.scioworks.com   m: +(65) 9782 9610

Scioworks Camino - "Don't develop Struts Apps without it!"


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>