Skip to content

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

fix for null-seed in seedfile http://forum.yacy-websuche.de/viewtopic.php?f=5&t=1653

lotus449e69743623
diff --git a/source/de/anomic/yacy/yacySeedDB.java b/source/de/anomic/yacy/yacySeedDB.java
index 0b6edc1ef..0a93e6a1f 100644
--- a/source/de/anomic/yacy/yacySeedDB.java
+++ b/source/de/anomic/yacy/yacySeedDB.java
@@ -134,6 +134,7 @@ public final class yacySeedDB implements httpdAlternativeDomainNames {
if (myOwnSeedFile.length() > 0) try {
// load existing identity
mySeed = yacySeed.load(myOwnSeedFile);
+ if(mySeed == null) throw new IOException("current seed is null");
} catch (final IOException e) {
// create new identity
serverLog.logSevere("SEEDDB", "could not load stored mySeed.txt from " + myOwnSeedFile.toString() + ": " + e.getMessage() + ". creating new seed.", e);