*) Bugfix for NullpointerException in hello.java

*) Correcting for loop in hello.java   

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1854 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
theli 19 years ago
parent 1965a8cf70
commit f108048a2c

@ -177,15 +177,22 @@ public final class hello {
if ((yacyCore.seedDB != null) && (yacyCore.seedDB.sizeConnected() > 0)) {
if (count > yacyCore.seedDB.sizeConnected()) { count = yacyCore.seedDB.sizeConnected(); }
if (count > 100) { count = 100; }
final yacySeed[] ySeeds = yacyCore.seedDB.seedsByAge(true, count); // latest seeds
seeds.ensureCapacity((ySeeds.length + 1) * 768);
// latest seeds
final yacySeed[] ySeeds = yacyCore.seedDB.seedsByAge(true, count);
// attach also my own seed
seeds.append("seed0=").append(yacyCore.seedDB.mySeed.genSeedStr(key)).append(serverCore.crlfString);
count = 1;
for (i = 1; i < ySeeds.length; i++) {
if ((ySeeds[i] != null) && (ySeeds[i].isProper() == null)) {
seeds.append(yacySeed.SEED).append(count).append(yacySeed.EQUAL).append(ySeeds[i].genSeedStr(key)).append(serverCore.crlfString);
count++;
// attach other seeds
if (ySeeds != null) {
seeds.ensureCapacity((ySeeds.length + 1) * 768);
for (i = 0; i < ySeeds.length; i++) {
if ((ySeeds[i] != null) && (ySeeds[i].isProper() == null)) {
seeds.append(yacySeed.SEED).append(count).append(yacySeed.EQUAL).append(ySeeds[i].genSeedStr(key)).append(serverCore.crlfString);
count++;
}
}
}
} else {

Loading…
Cancel
Save