If I have a rarely used collection in some class which may be instantiated many times, I may sometimes resort to the following \"idiom\" in order to save unnecessary object crea
There is an emptyIfNull method in package org.apache.commons.collections4;. It returns an empty list if the one provided is null.
emptyIfNull
package org.apache.commons.collections4;
List list = CollectionUtils.emptyIfNull(list);