Posts Tagged ‘null’
Null should never be returned from a method returning a collection or an array. Instead return a empty array (a static final empty array) or one of the empty collections (e.g.
Collections.EMPTY_LIST assuming the client should not be modifying the collection).
(submitted by Rand McNeely)