List<T> (Element dataElement) { List<T> list = new SmartList<>(); for (Element element : dataElement.getChildren()) { if (NULL_ELEMENT.equals(element.getName())) { list.add(null); } else if (myItemTagName.equals(element.getName())) { T item = myItemExternalizer.readValue(element); if (item == null) { LOG.error("Can't create element " + myItemExternalizer); return list; } list.add(item); } } return list; }