Monthly Archives: September 2009

Best javadoc ever

/** * Whatever to satisfy whatever. * * @author dave.copeland */

expectations==trouble

Continue reading ...

When is a null not a null?

tl/dr: Don't have a non-null object's .toString() display "null". It's confusing and not helpful when looking at object states in IDE debuggers. I recently converted the attribute of our Person POJO that stored a user's email address from a java.lang.String to a javax.mail.InternetAddress.  Call it not enough testing or lack of imagination, but I introduced a Null Pointer Exception in a back-office web flow where a new user is created for our customer service application.  When a new CSR account is created and the email address is left blank, an NPE gets thrown up.  Embarrassing, but easy to fix, right?