Null Flag

last modified: September 24, 2010

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


Loading...