From ed8227d2226dd30384ee305c4986a8197e07ffae Mon Sep 17 00:00:00 2001 From: theli Date: Wed, 27 Sep 2006 04:35:02 +0000 Subject: [PATCH] *) Bugfix for NullpoinerException in IndexCreateIndexingQueue_p.java See: http://www.yacy-forum.de/viewtopic.php?p=25874 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2667 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/IndexCreateIndexingQueue_p.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/htroot/IndexCreateIndexingQueue_p.java b/htroot/IndexCreateIndexingQueue_p.java index 1384f9df3..9926d6f23 100644 --- a/htroot/IndexCreateIndexingQueue_p.java +++ b/htroot/IndexCreateIndexingQueue_p.java @@ -49,6 +49,7 @@ import java.io.IOException; import de.anomic.data.wikiCode; import de.anomic.http.httpHeader; +import de.anomic.net.URL; import de.anomic.plasma.plasmaCrawlEURL; import de.anomic.plasma.plasmaSwitchboard; import de.anomic.plasma.plasmaSwitchboardQueue; @@ -183,21 +184,24 @@ public class IndexCreateIndexingQueue_p { prop.put("rejected_only-latest", 0); } dark = true; - String url, initiatorHash, executorHash; + URL url; + String initiatorHash, executorHash; plasmaCrawlEURL.Entry entry; yacySeed initiatorSeed, executorSeed; int j=0; for (int i = switchboard.urlPool.errorURL.stackSize() - 1; i >= (switchboard.urlPool.errorURL.stackSize() - showRejectedCount); i--) { try { entry = switchboard.urlPool.errorURL.stackPopEntry(i); + url = entry.url(); + if (url == null) continue; + initiatorHash = entry.initiator(); executorHash = entry.executor(); - url = entry.url().toString(); initiatorSeed = yacyCore.seedDB.getConnected(initiatorHash); executorSeed = yacyCore.seedDB.getConnected(executorHash); prop.put("rejected_list_"+j+"_initiator", ((initiatorSeed == null) ? "proxy" : wikiCode.replaceHTML(initiatorSeed.getName()))); prop.put("rejected_list_"+j+"_executor", ((executorSeed == null) ? "proxy" : wikiCode.replaceHTML(executorSeed.getName()))); - prop.put("rejected_list_"+j+"_url", wikiCode.replaceHTML(url)); + prop.put("rejected_list_"+j+"_url", wikiCode.replaceHTML(url.toString())); prop.put("rejected_list_"+j+"_failreason", entry.failreason()); prop.put("rejected_list_"+j+"_dark", ((dark) ? 1 : 0)); dark = !dark;