private String safeToString ( Object obj ) { String toString = null ; if ( obj != null ) { try { toString = obj . toString ( ) ; } catch ( Throwable ex ) { toString = "BAD toString() impl for " + obj . getClass ( ) . getName ( ) ; } } return toString ; }
provides a safe toString