Null Flag

Brief description :

A code block that uses null pointers as flags for exceptional conditions is signalling a NullPointerException.

How to avoid them :

Throw exceptions to signal exceptional conditions.

Or NullObject pattern.


Guidance:


Excerpt from http://www.ibm.com/developerworks/java/library/j-diag3.html

AntiPatternsCatalog


EditText of this page (last edited September 24, 2010) or FindPage with title or text search