Skip to content

Commit

Permalink
*) Bugfix for Entries with null url in GlobalQueue
Browse files Browse the repository at this point in the history
  • Loading branch information
theli committed Nov 13, 2005
1 parent 22da652 commit 444a5a9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 22 deletions.
7 changes: 4 additions & 3 deletions htroot/IndexCreateWWWGlobalQueue_p.java
Expand Up @@ -100,10 +100,10 @@ public static serverObjects respond(httpHeader header, serverObjects post, serve
yacySeed initiator;
String profileHandle;
plasmaCrawlProfile.entry profileEntry;
int i;
int i, showNum = 0;
for (i = 0; i < crawlerList.length; i++) {
urle = crawlerList[i];
if (urle != null) {
if ((urle != null)&&(urle.url()!=null)) {
initiator = yacyCore.seedDB.getConnected(urle.initiator());
profileHandle = urle.profileHandle();
profileEntry = (profileHandle == null) ? null : switchboard.profiles.getEntry(profileHandle);
Expand All @@ -115,9 +115,10 @@ public static serverObjects respond(httpHeader header, serverObjects post, serve
prop.put("crawler-queue_list_"+i+"_anchor", wikiCode.replaceHTML(urle.name()));
prop.put("crawler-queue_list_"+i+"_url", wikiCode.replaceHTML(urle.url().toString()));
dark = !dark;
showNum++;
}
}
prop.put("crawler-queue_list", i);
prop.put("crawler-queue_list", showNum);
}

// return rewrite properties
Expand Down
1 change: 0 additions & 1 deletion htroot/IndexCreate_p.java
Expand Up @@ -61,7 +61,6 @@
import de.anomic.htmlFilter.htmlFilterOutputStream;
import de.anomic.http.httpHeader;
import de.anomic.plasma.plasmaCrawlProfile;
import de.anomic.plasma.plasmaParser;
import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.plasma.plasmaURL;
import de.anomic.server.serverFileUtils;
Expand Down
36 changes: 18 additions & 18 deletions source/de/anomic/plasma/plasmaCrawlLURL.java
Expand Up @@ -430,25 +430,25 @@ public Entry(String urlHash) {
// if the url cannot be found, this returns null
this.urlHash = urlHash;
try {
byte[][] entry = urlHashCache.get(urlHash.getBytes());
if (entry != null) {
this.url = new URL(new String(entry[1]).trim());
this.descr = (entry[2] == null) ? this.url.toString() : new String(entry[2]).trim();
this.moddate = new Date(86400000 * serverCodings.enhancedCoder.decodeBase64Long(new String(entry[3])));
this.loaddate = new Date(86400000 * serverCodings.enhancedCoder.decodeBase64Long(new String(entry[4])));
this.referrerHash = (entry[5]==null)?dummyHash:new String(entry[5]);
this.copyCount = (int) serverCodings.enhancedCoder.decodeBase64Long(new String(entry[6]));
this.flags = new String(entry[7]);
this.quality = (int) serverCodings.enhancedCoder.decodeBase64Long(new String(entry[8]));
this.language = new String(entry[9]);
this.doctype = (char) entry[10][0];
this.size = (long) serverCodings.enhancedCoder.decodeBase64Long(new String(entry[11]));
this.wordCount = (int) serverCodings.enhancedCoder.decodeBase64Long(new String(entry[12]));
this.snippet = null;
return;
}
byte[][] entry = plasmaCrawlLURL.this.urlHashCache.get(urlHash.getBytes());
if (entry != null) {
this.url = new URL(new String(entry[1]).trim());
this.descr = (entry[2] == null) ? this.url.toString() : new String(entry[2]).trim();
this.moddate = new Date(86400000 * serverCodings.enhancedCoder.decodeBase64Long(new String(entry[3])));
this.loaddate = new Date(86400000 * serverCodings.enhancedCoder.decodeBase64Long(new String(entry[4])));
this.referrerHash = (entry[5]==null)?dummyHash:new String(entry[5]);
this.copyCount = (int) serverCodings.enhancedCoder.decodeBase64Long(new String(entry[6]));
this.flags = new String(entry[7]);
this.quality = (int) serverCodings.enhancedCoder.decodeBase64Long(new String(entry[8]));
this.language = new String(entry[9]);
this.doctype = (char) entry[10][0];
this.size = serverCodings.enhancedCoder.decodeBase64Long(new String(entry[11]));
this.wordCount = (int) serverCodings.enhancedCoder.decodeBase64Long(new String(entry[12]));
this.snippet = null;
return;
}
} catch (Exception e) {
serverLog.logSevere("PLASMA", "INTERNAL ERROR in plasmaLURL.entry/1: " + e.toString(), e);
serverLog.logSevere("PLASMA", "INTERNAL ERROR in plasmaLURL.entry/1: " + e.toString(), e);
}
}

Expand Down

0 comments on commit 444a5a9

Please sign in to comment.