ClassFilter[] (List<? extends Element> children) { if (ContainerUtil.isEmpty(children)) { return ClassFilter.EMPTY_ARRAY; } //do not leave null elements in the resulting array in case of read errors List<ClassFilter> filters = new ArrayList<>(children.size()); for (Element child : children) { try { filters.add(create(child)); } catch (InvalidDataException e) { LOG.error(e); } } return filters.toArray(ClassFilter.EMPTY_ARRAY); }