I was refactoring some old code of mine that I\'ve written and I stumbeled on this code:
List fullImagePool = new ArrayList<>();
Using Java 8:
List fullImagePool = Stream.of(style.getTestMH(), /* etc */) .filter(Objects::nonNull) .flatMap(l -> l.stream()) .collect(Collectors.toList());