*) avoid nullpointerException on seed.getAddress() (reported by netbude)

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3431 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
theli 2007-03-06 16:11:36 +00:00
parent fc43007490
commit 26450a1d9a

View File

@ -573,6 +573,10 @@ public final class yacySeedDB {
seed = (yacySeed) e.nextElement(); seed = (yacySeed) e.nextElement();
if (seed != null) { if (seed != null) {
addressStr = seed.getAddress(); addressStr = seed.getAddress();
if (addressStr == null) {
serverLog.logWarning("YACY","lookupByIP: address of seed " + seed.getName() + "is null.");
continue;
}
if ((pos = addressStr.indexOf(":"))!= -1) { if ((pos = addressStr.indexOf(":"))!= -1) {
addressStr = addressStr.substring(0,pos); addressStr = addressStr.substring(0,pos);
} }