Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
fixed a null pointer exception problem reported in the forum. I cant find the forum entry any more because my girlfriend switched off the power while the forum window was open.
orbiterf8efb3c94846
diff --git a/build.properties b/build.propertiesindex 6aa6c2d48..d9680aabc 100644--- a/build.properties+++ b/build.properties@@ -3,7 +3,7 @@ javacSource=1.4javacTarget=1.4# Release Configuration-releaseVersion=0.487+releaseVersion=0.488releaseFile=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz#releaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gzreleaseDir=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}diff --git a/source/de/anomic/index/indexRWIEntryNew.java b/source/de/anomic/index/indexRWIEntryNew.javaindex 8d857093d..dc2efb9b0 100644--- a/source/de/anomic/index/indexRWIEntryNew.java+++ b/source/de/anomic/index/indexRWIEntryNew.java@@ -149,6 +149,7 @@ public class indexRWIEntryNew implements Cloneable, indexRWIEntry {}public indexRWIEntryNew(indexRWIEntryOld oldEntry) {+ assert oldEntry.urlHash() != null;this.entry = urlEntryRow.newEntry();int mddlm = plasmaWordIndex.microDateDays(oldEntry.lastModified());int mddct = plasmaWordIndex.microDateDays(System.currentTimeMillis());diff --git a/source/de/anomic/index/indexRWIEntryOld.java b/source/de/anomic/index/indexRWIEntryOld.javaindex a0010f84b..cb090d988 100644--- a/source/de/anomic/index/indexRWIEntryOld.java+++ b/source/de/anomic/index/indexRWIEntryOld.java@@ -99,6 +99,7 @@ public class indexRWIEntryOld implements Cloneable, indexRWIEntry {// more needed attributes:// - boolean: appearance attributes: title, appears in header, anchor-descr, image-tag, hervorhebungen, meta-tags, word in link etc// - boolean: URL attributes+ assert (urlHash != null);assert (urlHash.length() == 12) : "urlhash = " + urlHash;if ((language == null) || (language.length() != urlEntryRow.width(col_language))) language = "uk";this.entry = urlEntryRow.newEntry();diff --git a/source/de/anomic/plasma/plasmaWordIndex.java b/source/de/anomic/plasma/plasmaWordIndex.javaindex 35d7220b6..f51036c03 100644--- a/source/de/anomic/plasma/plasmaWordIndex.java+++ b/source/de/anomic/plasma/plasmaWordIndex.java@@ -239,8 +239,11 @@ public final class plasmaWordIndex implements indexRI {}public indexContainer addEntry(String wordHash, indexRWIEntry entry, long updateTime, boolean dhtInCase) {- if ((useCollectionIndex) && (entry instanceof indexRWIEntryOld)) entry = new indexRWIEntryNew((indexRWIEntryOld) entry);-+ if ((useCollectionIndex) && (entry instanceof indexRWIEntryOld)) {+ if (entry.urlHash() == null) return null;+ entry = new indexRWIEntryNew((indexRWIEntryOld) entry);+ }+// set dhtInCase depending on wordHashif ((!dhtInCase) && (yacyDHTAction.shallBeOwnWord(wordHash))) dhtInCase = true;@@ -261,7 +264,9 @@ public final class plasmaWordIndex implements indexRI {indexRWIEntryOld old;while (i.hasNext()) {old = (indexRWIEntryOld) i.next();- newentries.add(new indexRWIEntryNew(old));+ if (old.urlHash() != null) {+ newentries.add(new indexRWIEntryNew(old));+ }}return newentries;}diff --git a/source/de/anomic/yacy/yacyClient.java b/source/de/anomic/yacy/yacyClient.javaindex 69afaa936..20d0f1470 100644--- a/source/de/anomic/yacy/yacyClient.java+++ b/source/de/anomic/yacy/yacyClient.java@@ -553,6 +553,7 @@ public final class yacyClient {// add the url entry to the word indexesfor (int m = 0; m < words; m++) {if ((wordIndex.useCollectionIndex) && (entry instanceof indexRWIEntryOld)) {+ if (entry.urlHash() == null) continue;entry = new indexRWIEntryNew((indexRWIEntryOld) entry);}container[m].add(new indexRWIEntry[]{entry}, System.currentTimeMillis());