From bb3e897baff5fd2615663de3e38fea75a8242c02 Mon Sep 17 00:00:00 2001 From: orbiter Date: Wed, 3 Aug 2005 13:43:55 +0000 Subject: [PATCH] mor minor changes git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@488 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- htroot/IndexControl_p.java | 10 +++++----- htroot/IndexCreate_p.java | 6 +++--- htroot/ProxyIndexingMonitor_p.java | 4 ++-- htroot/Status.java | 2 +- htroot/yacy/crawlOrder.java | 6 +++--- htroot/yacy/message.java | 4 ++-- htroot/yacy/transferURL.java | 2 +- 7 files changed, 17 insertions(+), 17 deletions(-) diff --git a/htroot/IndexControl_p.java b/htroot/IndexControl_p.java index e4f8b4c4b..870529478 100644 --- a/htroot/IndexControl_p.java +++ b/htroot/IndexControl_p.java @@ -76,8 +76,8 @@ public class IndexControl_p { prop.put("urlstring", ""); prop.put("urlhash", ""); prop.put("result", ""); - prop.put("wcount", "" + switchboard.wordIndex.size()); - prop.put("ucount", "" + switchboard.urlPool.loadedURL.size()); + prop.put("wcount", Integer.toString(switchboard.wordIndex.size())); + prop.put("ucount", Integer.toString(switchboard.urlPool.loadedURL.size())); prop.put("otherHosts", ""); prop.put("indexDistributeChecked", (switchboard.getConfig("allowDistributeIndex", "true").equals("true")) ? "checked" : ""); prop.put("indexReceiveChecked", (switchboard.getConfig("allowReceiveIndex", "true").equals("true")) ? "checked" : ""); @@ -284,14 +284,14 @@ public class IndexControl_p { hc++; } } - prop.put("hosts", "" + hc); + prop.put("hosts", Integer.toString(hc)); } else { prop.put("hosts", "0"); } // insert constants - prop.put("wcount", "" + switchboard.wordIndex.size()); - prop.put("ucount", "" + switchboard.urlPool.loadedURL.size()); + prop.put("wcount", Integer.toString(switchboard.wordIndex.size())); + prop.put("ucount", Integer.toString(switchboard.urlPool.loadedURL.size())); prop.put("indexDistributeChecked", (switchboard.getConfig("allowDistributeIndex", "true").equals("true")) ? "checked" : ""); prop.put("indexReceiveChecked", (switchboard.getConfig("allowReceiveIndex", "true").equals("true")) ? "checked" : ""); prop.put("indexReceiveBlockBlacklistChecked", (switchboard.getConfig("indexReceiveBlockBlacklist", "true").equals("true")) ? "checked" : ""); diff --git a/htroot/IndexCreate_p.java b/htroot/IndexCreate_p.java index b8e262fc1..615a4b476 100644 --- a/htroot/IndexCreate_p.java +++ b/htroot/IndexCreate_p.java @@ -105,7 +105,7 @@ public class IndexCreate_p { String newcrawlingfilter = post.get("crawlingFilter", ".*"); env.setConfig("crawlingFilter", newcrawlingfilter); int newcrawlingdepth = Integer.parseInt((String) post.get("crawlingDepth", "0")); - env.setConfig("crawlingDepth", ("" + newcrawlingdepth)); + env.setConfig("crawlingDepth", Integer.toString(newcrawlingdepth)); boolean crawlingQ = ((String) post.get("crawlingQ", "")).equals("on"); env.setConfig("crawlingQ", (crawlingQ) ? "true" : "false"); boolean storeHTCache = ((String) post.get("storeHTCache", "")).equals("on"); @@ -268,7 +268,7 @@ public class IndexCreate_p { } serverThread rct = switchboard.getThread("62_remotetriggeredcrawl"); rct.setBusySleep(newBusySleep); - env.setConfig("62_remotetriggeredcrawl_busysleep", "" + newBusySleep); + env.setConfig("62_remotetriggeredcrawl_busysleep", Long.toString(newBusySleep)); //boolean crawlResponse = ((String) post.get("acceptCrawlMax", "")).equals("on"); //env.setConfig("crawlResponse", (crawlResponse) ? "true" : "false"); } @@ -296,7 +296,7 @@ public class IndexCreate_p { long busySleep = Integer.parseInt(env.getConfig("62_remotetriggeredcrawl_busysleep", "100")); if (busySleep < 100) { busySleep = 100; - env.setConfig("62_remotetriggeredcrawl_busysleep", "" + busySleep); + env.setConfig("62_remotetriggeredcrawl_busysleep", Long.toString(busySleep)); } if (env.getConfig("crawlResponse", "").equals("true")) { if (busySleep <= 100) { diff --git a/htroot/ProxyIndexingMonitor_p.java b/htroot/ProxyIndexingMonitor_p.java index 6ea858a14..a3c6bd5cf 100644 --- a/htroot/ProxyIndexingMonitor_p.java +++ b/htroot/ProxyIndexingMonitor_p.java @@ -78,7 +78,7 @@ public class ProxyIndexingMonitor_p { if (post.containsKey("proxyprofileset")) try { // read values and put them in global settings int newProxyPrefetchDepth = Integer.parseInt((String) post.get("proxyPrefetchDepth", "0")); - env.setConfig("proxyPrefetchDepth", "" + newProxyPrefetchDepth); + env.setConfig("proxyPrefetchDepth", Integer.toString(newProxyPrefetchDepth)); boolean proxyStoreHTCache = ((String) post.get("proxyStoreHTCache", "")).equals("on"); env.setConfig("proxyStoreHTCache", (proxyStoreHTCache) ? "true" : "false"); @@ -88,7 +88,7 @@ public class ProxyIndexingMonitor_p { prop.put("info", 1);//delete DATA/PLASMADB/crawlProfiles0.db } else { try { - profile.changeEntry("generalDepth", "" + newProxyPrefetchDepth); + profile.changeEntry("generalDepth", Integer.toString(newProxyPrefetchDepth)); profile.changeEntry("storeHTCache", (proxyStoreHTCache) ? "true": "false"); prop.put("info", 2);//new proxyPrefetchdepth prop.put("info_message", newProxyPrefetchDepth); diff --git a/htroot/Status.java b/htroot/Status.java index e429628ba..9467cc8fc 100644 --- a/htroot/Status.java +++ b/htroot/Status.java @@ -90,7 +90,7 @@ public class Status { else prop.put("versioncomment", 0);//no commet - prop.put("versioncomment_latestVersion", "" + yacyCore.latestVersion); + prop.put("versioncomment_latestVersion", Float.toString(yacyCore.latestVersion)); prop.put("host", serverCore.publicLocalIP()); prop.put("port", env.getConfig("port", "")); diff --git a/htroot/yacy/crawlOrder.java b/htroot/yacy/crawlOrder.java index 049f6b55a..57b962ee4 100644 --- a/htroot/yacy/crawlOrder.java +++ b/htroot/yacy/crawlOrder.java @@ -133,7 +133,7 @@ public class crawlOrder { } else if (queuesize > 100) { response = "rejected"; reason = "busy"; - delay = "" + (30 + queuesize * acceptDelay); + delay = Integer.toString(30 + queuesize * acceptDelay); } else if (!(process.equals("crawl"))) { response = "denied"; reason = "unknown-order"; @@ -172,7 +172,7 @@ public class crawlOrder { response = (String) stackresult[0]; reason = (String) stackresult[1]; lurl = (String) stackresult[2]; - delay = (response.equals("stacked")) ? "" + (5 + acceptDelay) : "1"; // this value needs to be calculated individually + delay = (response.equals("stacked")) ? Integer.toString(5 + acceptDelay) : "1"; // this value needs to be calculated individually } else { // new method: several urls int stackCount = 0; @@ -189,7 +189,7 @@ public class crawlOrder { response = "enqueued"; reason = "ok"; lurl = ""; - delay = "" + (stackCount * acceptDelay + 1); + delay = Integer.toString(stackCount * acceptDelay + 1); } } } catch (Exception e) { diff --git a/htroot/yacy/message.java b/htroot/yacy/message.java index 4fe3522ff..6c19b21d8 100644 --- a/htroot/yacy/message.java +++ b/htroot/yacy/message.java @@ -98,8 +98,8 @@ public class message { return prop; } - prop.put("messagesize", "" + messagesize); - prop.put("attachmentsize", "" + attachmentsize); + prop.put("messagesize", Integer.toString(messagesize)); + prop.put("attachmentsize", Integer.toString(attachmentsize)); if (process.equals("permission")) { // permission: respond with accceptabeale message and attachment size diff --git a/htroot/yacy/transferURL.java b/htroot/yacy/transferURL.java index 34abb330e..2f90c0e9d 100644 --- a/htroot/yacy/transferURL.java +++ b/htroot/yacy/transferURL.java @@ -105,7 +105,7 @@ public class transferURL { // return rewrite properties int more = switchboard.urlPool.loadedURL.size() - sizeBefore; - doublevalues = "" + (received - more); + doublevalues = Integer.toString(received - more); switchboard.getLog().logInfo("Received " + received + " URLs from peer " + iam); if ((received - more) > 0) switchboard.getLog().logError("Received " + doublevalues + " double URLs from peer " + iam); result = "ok";