Skip to content

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

fix for NPE during host navigation computation

Michael Peter Christen06b0081fdcbe
diff --git a/source/net/yacy/kelondro/data/meta/URIMetadataNode.java b/source/net/yacy/kelondro/data/meta/URIMetadataNode.java
index 518880fdb..a5cc5c398 100644
--- a/source/net/yacy/kelondro/data/meta/URIMetadataNode.java
+++ b/source/net/yacy/kelondro/data/meta/URIMetadataNode.java
@@ -146,7 +146,9 @@ public class URIMetadataNode implements URIMetadata {
@Override
public String hosthash() {
- return (String) this.doc.getFieldValue(YaCySchema.host_id_s.name());
+ String hosthash = (String) this.doc.getFieldValue(YaCySchema.host_id_s.name());
+ if (hosthash == null) hosthash = ASCII.String(this.hash, 6, 6);
+ return hosthash;
}
@Override