Java Usuń listę zerową
dataList.removeAll(Collections.singleton(null));
Copperfield
dataList.removeAll(Collections.singleton(null));
2. HOW TO REMOVE NULL VALUES
List<String> list = new ArrayList
(Arrays.asList("Java",null,"Python",null, "Ruby"));
CollectionUtils.filter(list, PredicateUtils.notNullPredicate());
==> removes nulls
System.out.println(list);