Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
check for loading error (includs unsupported formats) to prevent blank thumbnail display in image search because of not handled source which don't load on click. Now the cross icon indicates the problem (inlcuding not supported format)
reger2f51baff4f29
diff --git a/source/net/yacy/document/ImageParser.java b/source/net/yacy/document/ImageParser.javaindex 69c25e576..ef1fd3580 100644--- a/source/net/yacy/document/ImageParser.java+++ b/source/net/yacy/document/ImageParser.java@@ -69,7 +69,16 @@ public class ImageParser {final int handle = image.hashCode();mediaTracker.addImage(image, handle);- try {mediaTracker.waitForID(handle);} catch (final InterruptedException e) {}+ try {+ mediaTracker.waitForID(handle);++ if (mediaTracker.isErrorID(handle)) { // true if status ERRORD during loading (happens on not supported formats too)+ mediaTracker.removeImage(image, handle);+ image = null; // return null to indicate source not handled+ }+ } catch (final InterruptedException e) {+ return null;+ }return image;}