mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
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. git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3039 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
83cdf056c1
commit
f8efb3c948
|
@ -3,7 +3,7 @@ javacSource=1.4
|
|||
javacTarget=1.4
|
||||
|
||||
# Release Configuration
|
||||
releaseVersion=0.487
|
||||
releaseVersion=0.488
|
||||
releaseFile=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
|
||||
#releaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
|
||||
releaseDir=yacy_dev_v${releaseVersion}_${DSTAMP}_${releaseNr}
|
||||
|
|
|
@ -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());
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -239,7 +239,10 @@ 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 wordHash
|
||||
if ((!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;
|
||||
}
|
||||
|
|
|
@ -553,6 +553,7 @@ public final class yacyClient {
|
|||
// add the url entry to the word indexes
|
||||
for (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());
|
||||
|
|
Loading…
Reference in New Issue
Block a user