Archive for October 13th, 2008
null checking in the extreme
October 13th, 2008 by Jeanne BoyarskyIn Java, we’re told to check for nulls to avoid unexpected null pointer exceptions. This can be taken too far though. Consider the following code: When did builder have the opportunity to become null? By definition, a constructor creates an object. We just called the constructor. We know builder isn’t null. Having extra code around [...]
Posted: 13 October, 2008 in Development Process.
Tags: Java/J2EE, null
Comments: 17
