public List<Integer> add2(File file) { List<Integer> resultList = new ArrayList<>(); for (int i : ListUtils.emptyIfNull(file.getNumbers())) { resultList.append(i + 2); } return resultList; }
It's amazing how far people will go to defend a bad practice, than even its inventor called a 'billion dollar mistake'.
That's a case that comes up a lot! DB read failed vs DB read 0 items for example.