Description
StringUtils has method defaultIfEmpty and ObjectUtils has defaultIfNull. A parallel method is missing from ArrayUtils, and would provide a shorthand way of normalizing arrays. My first inclination was nullIfEmpty because no simple default value is readily available or easy to specify. But Henri mentioned that defaultIfEmpty might better parallel the other implementations. That option would work okay for me, as I can just specify null as the default.