SyntaxFix
Write A Post
Hire A Developer
Questions
You can use org.apache.commons.lang.Validate's "notEmpty" method:
org.apache.commons.lang.Validate
Validate.notEmpty(myCollection) -> Validate that the specified argument collection is neither null nor a size of zero (no elements); otherwise throwing an exception.
Validate.notEmpty(myCollection)