/** * @param holder * @param element */ protected static void loadImages(final ImageHolder holder, final DomElement element) { final Collection<DomElement> images = element.getChildren("image"); for (final DomElement image : images) { final String attribute = image.getAttribute("size"); ImageSize size = null; if (attribute == null) { size = ImageSize.LARGESQUARE; } else { try { size = ImageSize.valueOf(attribute.toUpperCase(Locale.ENGLISH)); } catch (final IllegalArgumentException e) { // if they suddenly again introduce a new image size } } if (size != null) { holder.imageUrls.put(size, image.getText()); } } }