The motivation for this changes are
- Majority of time the intention is to check that the collection is not empty instead of empty, as we cannot do much for null collections.
CollectionUtils.isNotEmpty(collection)
is more readable than!CollectionUtils.isEmpty(collection)
and there is no chance os missing the!
.CollectionUtils::isNotEmpty
can be used as method reference.
Comment From: pivotal-cla
@SaifAliKhan1 Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.