Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

fix for http://forum.yacy-websuche.de/viewtopic.php?p=18918#p18918

orbitera512aef6adf2
diff --git a/source/de/anomic/search/MetadataRepository.java b/source/de/anomic/search/MetadataRepository.java
index 25c750bdf..90b8e5aba 100644
--- a/source/de/anomic/search/MetadataRepository.java
+++ b/source/de/anomic/search/MetadataRepository.java
@@ -364,7 +364,10 @@ public final class MetadataRepository implements Iterable<byte[]> {
} else {
final URIMetadataRow.Components metadata = entry.metadata();
totalSearchedUrls++;
- if (metadata.url() == null) {
+ if (metadata == null) {
+ if (Log.isFine("URLDBCLEANER")) Log.logFine("URLDBCLEANER", "corrupted entry for hash = " + entry.hash());
+ remove(entry.hash());
+ } else if (metadata.url() == null) {
if (Log.isFine("URLDBCLEANER")) Log.logFine("URLDBCLEANER", ++blacklistedUrls + " blacklisted (" + ((double) blacklistedUrls / totalSearchedUrls) * 100 + "%): " + entry.hash() + "URL == null");
remove(entry.hash());
} else if (blacklist.isListed(Blacklist.BLACKLIST_CRAWLER, metadata.url()) ||