Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
assign strings before checking contents
bhoerdznb4f0c822f2d2
diff --git a/htroot/CrawlStartExpert_p.java b/htroot/CrawlStartExpert_p.javaindex 72d2b4ff4..d9f3dd2f4 100644--- a/htroot/CrawlStartExpert_p.java+++ b/htroot/CrawlStartExpert_p.java@@ -46,9 +46,10 @@ public class CrawlStartExpert_p {// ---------- Start point// crawl start URLif (post != null && post.containsKey("crawlingURL")) {- prop.put("starturl", post.get("crawlingURL", ""));+ final String crawlingURL = post.get("crawlingURL", "");+ prop.put("starturl", crawlingURL);// simple check for content since it may be empty- if (!prop.get("crawlingURL").trim().isEmpty()) {+ if (!crawlingURL.trim().isEmpty()) {prop.put("has_url", "1");}} else {@@ -57,9 +58,10 @@ public class CrawlStartExpert_p {// sitemap URLif (post != null && post.containsKey("sitemapURL")) {- prop.put("sitemapURL", post.get("sitemapURL", ""));+ final String sitemapURL = post.get("sitemapURL", "");+ prop.put("sitemapURL", sitemapURL);// simple check for content since it may be empty- if (!prop.get("sitemapURL").trim().isEmpty()) {+ if (!sitemapURL.trim().isEmpty()) {prop.put("has_sitemapURL", "1");}} else {@@ -68,9 +70,10 @@ public class CrawlStartExpert_p {// crawling fileif (post != null && post.containsKey("crawlingFile")) {- prop.put("crawlingFile", post.get("crawlingFile", ""));+ final String crawlingFile = post.get("crawlingFile", "");+ prop.put("crawlingFile", crawlingFile);// simple check for content since it may be empty- if (!prop.get("crawlingFile").trim().isEmpty()) {+ if (!crawlingFile.trim().isEmpty()) {prop.put("has_crawlingFile", "1");}} else {