diff --git a/source/net/yacy/search/query/SearchEvent.java b/source/net/yacy/search/query/SearchEvent.java index 077eaec61..7ac36955c 100644 --- a/source/net/yacy/search/query/SearchEvent.java +++ b/source/net/yacy/search/query/SearchEvent.java @@ -1567,8 +1567,8 @@ public final class SearchEvent { List prt = CollectionConfiguration.indexedList2protocolList(doc.getFieldValues(CollectionSchema.images_protocol_sxt.getSolrFieldName()), img.size()); Collection heightO = doc.getFieldValues(CollectionSchema.images_height_val.getSolrFieldName()); Collection widthO = doc.getFieldValues(CollectionSchema.images_width_val.getSolrFieldName()); - List height = heightO == null ? new ArrayList(img.size()) : (List) heightO; - List width = widthO == null ? new ArrayList(img.size()) : (List) widthO; + List height = heightO == null ? null : (List) heightO; + List width = widthO == null ? null : (List) widthO; for (int c = 0; c < img.size(); c++) { String image_urlstub = (String) img.get(c); if (image_urlstub.endsWith(".ico")) continue; // we don't want favicons, makes the result look idiotic @@ -1576,8 +1576,8 @@ public final class SearchEvent { boolean match = (query.getQueryGoal().matches(image_urlstub) || query.getQueryGoal().matches(image_alt)); try { DigestURL imageUrl = new DigestURL((prt != null && prt.size() > c ? prt.get(c) : "http") + "://" + image_urlstub); - Integer h = (Integer) height.get(c); - Integer w = (Integer) width.get(c); + Integer h = height == null ? null : (Integer) height.get(c); + Integer w = width == null ? null : (Integer) width.get(c); boolean sizeok = h != null && w != null && h.intValue() > 16 && w.intValue() > 16; String id = ASCII.String(imageUrl.hash()); if (!imageViewed.containsKey(id) && !containsSpare(id)) {