What is the best way to remove null items from a list in Groovy?
ex: [null, 30, null]
[null, 30, null]
want to return: [30]
[30]
Simply [null].findAll{null != it} if it is null then it return false so it will not exist in new collection.
[null].findAll{null != it}
it