(no title)
samuellb | 9 years ago
log.trace("doStuff(" + obj1 + ", " + obj2 + ")");
to this:
log.trace("doStuff(" + (obj1 != null ? obj1 : "null") + ", " + (obj2 != null ? obj2 : "null") + ")");
The second one is IMHO quite hard to read, even in this short example (and code readability is important when you do code reviews)
tomtomtom777|9 years ago
For string formatting, rendering "null" (or "") makes sense; for coercion not.
richardwhiuk|9 years ago