diff --git a/htroot/CacheAdmin_p.java b/htroot/CacheAdmin_p.java
index 159ca48e0..98ffc74d0 100644
--- a/htroot/CacheAdmin_p.java
+++ b/htroot/CacheAdmin_p.java
@@ -142,8 +142,8 @@ public class CacheAdmin_p {
}
//
- prop.put("cachesize", "" + (switchboard.cacheManager.currCacheSize/1024));
- prop.put("cachemax", "" + (switchboard.cacheManager.maxCacheSize/1024));
+ prop.put("cachesize", Long.toString(switchboard.cacheManager.currCacheSize/1024));
+ prop.put("cachemax", Long.toString(switchboard.cacheManager.maxCacheSize/1024));
prop.put("tree", tree);
prop.put("info", info);
// return rewrite properties
diff --git a/htroot/IndexCreate_p.html b/htroot/IndexCreate_p.html
index 95b9831a0..f3991f7de 100644
--- a/htroot/IndexCreate_p.html
+++ b/htroot/IndexCreate_p.html
@@ -246,7 +246,7 @@ Continue crawling.
#{/crawlProfiles}#
-Other Peer Crawl Starts (recently started with remote indexing; this is a YaCyNews Service):
+Recently started remote crawls in progress:
-#{otherCrawlStart}#
+#{otherCrawlStartInProgress}#
#[cre]# |
#[peername]# |
@@ -265,7 +265,29 @@ Continue crawling.
#[generalDepth]# |
#(crawlingQ)#no::yes#(/crawlingQ)# |
-#{/otherCrawlStart}#
+#{/otherCrawlStartInProgress}#
+
+
+Recently started remote crawls, finished:
+
+
+#{otherCrawlStartFinished}#
+
+ #[cre]# |
+ #[peername]# |
+ #[startURL]# |
+ #[intention]# |
+ #[generalDepth]# |
+ #(crawlingQ)#no::yes#(/crawlingQ)# |
+
+#{/otherCrawlStartFinished}#
Remote Crawling Peers:
diff --git a/htroot/IndexCreate_p.java b/htroot/IndexCreate_p.java
index 67ab68904..b8e262fc1 100644
--- a/htroot/IndexCreate_p.java
+++ b/htroot/IndexCreate_p.java
@@ -371,20 +371,45 @@ public class IndexCreate_p {
if (record.category().equals("crwlstrt")) {
peer = yacyCore.seedDB.get(record.originator());
if (peer == null) peername = record.originator(); else peername = peer.getName();
- prop.put("otherCrawlStart_" + showedCrawl + "_dark", ((dark) ? 1 : 0));
- prop.put("otherCrawlStart_" + showedCrawl + "_cre", record.created());
- prop.put("otherCrawlStart_" + showedCrawl + "_peername", peername);
- prop.put("otherCrawlStart_" + showedCrawl + "_startURL", record.attributes().get("startURL"));
- prop.put("otherCrawlStart_" + showedCrawl + "_intention", record.attributes().get("intention"));
- prop.put("otherCrawlStart_" + showedCrawl + "_generalDepth", record.attributes().get("generalDepth"));
- prop.put("otherCrawlStart_" + showedCrawl + "_crawlingQ", (record.attributes().get("crawlingQ").equals("true")) ? 1 : 0);
+ prop.put("otherCrawlStartInProgress_" + showedCrawl + "_dark", ((dark) ? 1 : 0));
+ prop.put("otherCrawlStartInProgress_" + showedCrawl + "_cre", record.created());
+ prop.put("otherCrawlStartInProgress_" + showedCrawl + "_peername", peername);
+ prop.put("otherCrawlStartInProgress_" + showedCrawl + "_startURL", record.attributes().get("startURL"));
+ prop.put("otherCrawlStartInProgress_" + showedCrawl + "_intention", record.attributes().get("intention"));
+ prop.put("otherCrawlStartInProgress_" + showedCrawl + "_generalDepth", record.attributes().get("generalDepth"));
+ prop.put("otherCrawlStartInProgress_" + showedCrawl + "_crawlingQ", (record.attributes().get("crawlingQ").equals("true")) ? 1 : 0);
showedCrawl++;
if (showedCrawl > 20) break;
}
}
} catch (IOException e) {}
- prop.put("otherCrawlStart", showedCrawl);
+ prop.put("otherCrawlStartInProgress", showedCrawl);
+
+ // finished remote crawls
+ availableNews = yacyCore.newsPool.size(yacyNewsPool.PROCESSED_DB);
+ showedCrawl = 0;
+ try {
+ for (int c = 0; c < availableNews; c++) {
+ record = yacyCore.newsPool.get(yacyNewsPool.PROCESSED_DB, c);
+ if (record == null) continue;
+ if (record.category().equals("crwlstrt")) {
+ peer = yacyCore.seedDB.get(record.originator());
+ if (peer == null) peername = record.originator(); else peername = peer.getName();
+ prop.put("otherCrawlStartFinished_" + showedCrawl + "_dark", ((dark) ? 1 : 0));
+ prop.put("otherCrawlStartFinished_" + showedCrawl + "_cre", record.created());
+ prop.put("otherCrawlStartFinished_" + showedCrawl + "_peername", peername);
+ prop.put("otherCrawlStartFinished_" + showedCrawl + "_startURL", record.attributes().get("startURL"));
+ prop.put("otherCrawlStartFinished_" + showedCrawl + "_intention", record.attributes().get("intention"));
+ prop.put("otherCrawlStartFinished_" + showedCrawl + "_generalDepth", record.attributes().get("generalDepth"));
+ prop.put("otherCrawlStartFinished_" + showedCrawl + "_crawlingQ", (record.attributes().get("crawlingQ").equals("true")) ? 1 : 0);
+ showedCrawl++;
+ if (showedCrawl > 20) break;
+ }
+
+ }
+ } catch (IOException e) {}
+ prop.put("otherCrawlStartFinished", showedCrawl);
// remote crawl peers
diff --git a/htroot/IndexShare_p.java b/htroot/IndexShare_p.java
index 69321499f..00d694894 100644
--- a/htroot/IndexShare_p.java
+++ b/htroot/IndexShare_p.java
@@ -65,8 +65,8 @@ public class IndexShare_p {
prop.put("wordfreq", switchboard.getConfig("defaultWordReceiveFrequency","10"));
prop.put("dtable", "");
prop.put("rtable", "");
- 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()));
return prop; // be save
}
@@ -78,8 +78,8 @@ public class IndexShare_p {
}
// 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()));
// return rewrite properties
return prop;
}
diff --git a/htroot/Network.java b/htroot/Network.java
index 03c50296b..cfbc918d2 100644
--- a/htroot/Network.java
+++ b/htroot/Network.java
@@ -114,8 +114,8 @@ public class Network {
prop.put("table_my-uptime", serverDate.intervalToString(60000 * Long.parseLong(seed.get("Uptime", ""))));
prop.put("table_my-links", groupDigits(links));
prop.put("table_my-words", groupDigits(words));
- prop.put("table_my-acceptcrawl", "" + (seed.getFlagAcceptRemoteCrawl() ? 1 : 0) );
- prop.put("table_my-acceptindex", "" + (seed.getFlagAcceptRemoteIndex() ? 1 : 0) );
+ prop.put("table_my-acceptcrawl", Integer.toString(seed.getFlagAcceptRemoteCrawl() ? 1 : 0) );
+ prop.put("table_my-acceptindex", Integer.toString(seed.getFlagAcceptRemoteIndex() ? 1 : 0) );
prop.put("table_my-sI", seed.get("sI", "-"));
prop.put("table_my-sU", seed.get("sU", "-"));
prop.put("table_my-rI", seed.get("rI", "-"));
@@ -351,11 +351,11 @@ public class Network {
} catch (java.text.ParseException e) {
l = 999;
}
- if (l == 999) return "-"; else return "" + l;
+ if (l == 999) return "-"; else return Long.toString(l);
}
private static String groupDigits(long Number) {
- String s = "" + Number;
+ String s = Long.toString(Number);
String t = "";
for (int i = 0; i < s.length(); i++) t = s.charAt(s.length() - i - 1) + (((i % 3) == 0) ? "," : "") + t;
return t.substring(0, t.length() - 1);
diff --git a/htroot/Performance_p.java b/htroot/Performance_p.java
index 77c0032cb..9739afacc 100644
--- a/htroot/Performance_p.java
+++ b/htroot/Performance_p.java
@@ -100,7 +100,7 @@ public class Performance_p {
prop.put("table_" + c + "_shortdescr", (thread.getMonitorURL() == null) ? thread.getShortDescription() : "" + thread.getShortDescription() + "");
prop.put("table_" + c + "_longdescr", thread.getLongDescription());
queuesize = thread.getJobCount();
- prop.put("table_" + c + "_queuesize", (queuesize == Integer.MAX_VALUE) ? "unlimited" : ("" + queuesize));
+ prop.put("table_" + c + "_queuesize", (queuesize == Integer.MAX_VALUE) ? "unlimited" : Integer.toString(queuesize));
blocktime = thread.getBlockTime();
sleeptime = thread.getSleepTime();
@@ -109,17 +109,17 @@ public class Performance_p {
busyCycles = thread.getBusyCycles();
memshortageCycles = thread.getOutOfMemoryCycles();
prop.put("table_" + c + "_blocktime", blocktime / 1000);
- prop.put("table_" + c + "_blockpercent", "" + (100 * blocktime / blocktime_total));
+ prop.put("table_" + c + "_blockpercent", Long.toString(100 * blocktime / blocktime_total));
prop.put("table_" + c + "_sleeptime", sleeptime / 1000);
- prop.put("table_" + c + "_sleeppercent", "" + (100 * sleeptime / sleeptime_total));
+ prop.put("table_" + c + "_sleeppercent", Long.toString(100 * sleeptime / sleeptime_total));
prop.put("table_" + c + "_exectime", exectime / 1000);
- prop.put("table_" + c + "_execpercent", "" + (100 * exectime / exectime_total));
- prop.put("table_" + c + "_totalcycles", "" + (idleCycles + busyCycles + memshortageCycles));
- prop.put("table_" + c + "_idlecycles", "" + idleCycles);
- prop.put("table_" + c + "_busycycles", "" + busyCycles);
- prop.put("table_" + c + "_memscycles", "" + memshortageCycles);
- prop.put("table_" + c + "_sleeppercycle", ((idleCycles + busyCycles) == 0) ? "-" : ("" + (sleeptime / (idleCycles + busyCycles))));
- prop.put("table_" + c + "_execpercycle", (busyCycles == 0) ? "-" : ("" + (exectime / busyCycles)));
+ prop.put("table_" + c + "_execpercent", Long.toString(100 * exectime / exectime_total));
+ prop.put("table_" + c + "_totalcycles", Long.toString(idleCycles + busyCycles + memshortageCycles));
+ prop.put("table_" + c + "_idlecycles", Long.toString(idleCycles));
+ prop.put("table_" + c + "_busycycles", Long.toString(busyCycles));
+ prop.put("table_" + c + "_memscycles", Long.toString(memshortageCycles));
+ prop.put("table_" + c + "_sleeppercycle", ((idleCycles + busyCycles) == 0) ? "-" : Long.toString(sleeptime / (idleCycles + busyCycles)));
+ prop.put("table_" + c + "_execpercycle", (busyCycles == 0) ? "-" : Long.toString(exectime / busyCycles));
if ((post != null) && (post.containsKey("submitdelay"))) {
// load with new values
@@ -171,10 +171,10 @@ public class Performance_p {
if ((post != null) && (post.containsKey("cacheSizeSubmit"))) {
int wordCacheMax = Integer.parseInt((String) post.get("wordCacheMax", "10000"));
- switchboard.setConfig("wordCacheMax", "" + wordCacheMax);
+ switchboard.setConfig("wordCacheMax", Integer.toString(wordCacheMax));
switchboard.wordIndex.setMaxWords(wordCacheMax);
int maxWaitingWordFlush = Integer.parseInt((String) post.get("maxWaitingWordFlush", "180"));
- switchboard.setConfig("maxWaitingWordFlush", "" + maxWaitingWordFlush);
+ switchboard.setConfig("maxWaitingWordFlush", Integer.toString(maxWaitingWordFlush));
}
if ((post != null) && (post.containsKey("poolConfig"))) {
@@ -224,7 +224,7 @@ public class Performance_p {
if ((post != null) && (post.containsKey("proxyControlSubmit"))) {
int onlineCautionDelay = Integer.parseInt((String) post.get("onlineCautionDelay", "30000"));
- switchboard.setConfig("onlineCautionDelay", "" + onlineCautionDelay);
+ switchboard.setConfig("onlineCautionDelay", Integer.toString(onlineCautionDelay));
}
// table cache settings
diff --git a/htroot/ProxyIndexingMonitor_p.html b/htroot/ProxyIndexingMonitor_p.html
index e61c318ac..72bb49d76 100644
--- a/htroot/ProxyIndexingMonitor_p.html
+++ b/htroot/ProxyIndexingMonitor_p.html
@@ -56,7 +56,7 @@ Please delete that file and restart.
#(/info)#
You can see a snapshot of recently indexed pages
-on the Proxy Index Monitor Page.
+on the Proxy Index Monitor Page.
#[footer]#
diff --git a/htroot/SettingsAck_p.java b/htroot/SettingsAck_p.java
index 53373ec8d..eee824c51 100644
--- a/htroot/SettingsAck_p.java
+++ b/htroot/SettingsAck_p.java
@@ -337,7 +337,7 @@ public class SettingsAck_p {
httpdProxyHandler.remoteProxyNoProxy = (String) post.get("remoteProxyNoProxy", "");
httpdProxyHandler.remoteProxyNoProxyPatterns = httpdProxyHandler.remoteProxyNoProxy.split(",");
env.setConfig("remoteProxyHost", httpdProxyHandler.remoteProxyHost);
- env.setConfig("remoteProxyPort", "" + httpdProxyHandler.remoteProxyPort);
+ env.setConfig("remoteProxyPort", Integer.toString(httpdProxyHandler.remoteProxyPort));
env.setConfig("remoteProxyNoProxy", httpdProxyHandler.remoteProxyNoProxy);
env.setConfig("remoteProxyUse", (httpdProxyHandler.remoteProxyUse) ? "true" : "false");
prop.put("info", 15); // The remote-proxy setting has been changed
diff --git a/htroot/env/templates/header.template b/htroot/env/templates/header.template
index e725e307e..4eb8f1022 100644
--- a/htroot/env/templates/header.template
+++ b/htroot/env/templates/header.template
@@ -60,8 +60,8 @@
-
+
diff --git a/htroot/yacy/search.java b/htroot/yacy/search.java
index 673e0e993..86e5bb2ea 100644
--- a/htroot/yacy/search.java
+++ b/htroot/yacy/search.java
@@ -88,7 +88,7 @@ public class search {
}
long timestamp = System.currentTimeMillis();
prop = switchboard.searchFromRemote(keyhashes, count, global, duetime);
- prop.put("searchtime", "" + (System.currentTimeMillis() - timestamp));
+ prop.put("searchtime", Long.toString(System.currentTimeMillis() - timestamp));
int links = Integer.parseInt(prop.get("linkcount","0"));
yacyCore.seedDB.mySeed.incSI(links);
diff --git a/source/de/anomic/data/messageBoard.java b/source/de/anomic/data/messageBoard.java
index 9cacdd7d6..9751f0523 100644
--- a/source/de/anomic/data/messageBoard.java
+++ b/source/de/anomic/data/messageBoard.java
@@ -87,7 +87,7 @@ public class messageBoard {
}
private String snString() {
- String s = "" + sn;
+ String s = Integer.toString(sn);
if (s.length() == 1) s = "0" + s;
sn++;
if (sn > 99) sn = 0;
diff --git a/source/de/anomic/http/httpc.java b/source/de/anomic/http/httpc.java
index 1e05922ed..e5bda7c14 100644
--- a/source/de/anomic/http/httpc.java
+++ b/source/de/anomic/http/httpc.java
@@ -730,7 +730,7 @@ public final class httpc {
clientOutput.write(buffer, 0, c);
len += c;
}
- requestHeader.put(httpHeader.CONTENT_LENGTH, "" + len);
+ requestHeader.put(httpHeader.CONTENT_LENGTH, Integer.toString(len));
}
clientOutput.flush();
return new response(false);
@@ -809,7 +809,7 @@ public final class httpc {
byte[] body = buf.toByteArray();
//System.out.println("DEBUG: PUT BODY=" + new String(body));
// size of that body
- requestHeader.put(httpHeader.CONTENT_LENGTH, "" + body.length);
+ requestHeader.put(httpHeader.CONTENT_LENGTH, Integer.toString(body.length));
// send the header
//System.out.println("header=" + requestHeader);
send(httpHeader.METHOD_POST, path, requestHeader, false);
diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.java
index 806a85698..74f33c1ef 100644
--- a/source/de/anomic/http/httpd.java
+++ b/source/de/anomic/http/httpd.java
@@ -698,7 +698,7 @@ public final class httpd implements serverHandler {
// prepare to pass values
Properties prop = new Properties();
prop.setProperty("HOST", arg);
- prop.setProperty("PORT", "" + port);
+ prop.setProperty("PORT", Integer.toString(port));
prop.setProperty("HTTP", httpVersion);
// pass to proxy
@@ -989,7 +989,7 @@ public final class httpd implements serverHandler {
line = readLine(p, buffer);
pos = nextPos;
}
- header.put("ARGC", ("" + argc)); // store argument count
+ header.put("ARGC", Integer.toString(argc)); // store argument count
return files;
}
@@ -1150,7 +1150,7 @@ public final class httpd implements serverHandler {
httpHeader header = new httpHeader();
header.put(httpHeader.DATE, httpc.dateString(httpc.nowDate()));
header.put(httpHeader.CONTENT_TYPE, "text/html");
- header.put(httpHeader.CONTENT_LENGTH, "" + result.length);
+ header.put(httpHeader.CONTENT_LENGTH, Integer.toString(result.length));
header.put(httpHeader.PRAGMA, "no-cache");
sendRespondHeader(conProp,respond,httpVersion,httpStatusCode,httpStatusText,header);
diff --git a/source/de/anomic/http/httpdAbstractHandler.java b/source/de/anomic/http/httpdAbstractHandler.java
index 0ebfebbfb..a61e2f051 100644
--- a/source/de/anomic/http/httpdAbstractHandler.java
+++ b/source/de/anomic/http/httpdAbstractHandler.java
@@ -66,7 +66,7 @@ public abstract class httpdAbstractHandler {
new SimpleDateFormat("yyyyMMddHHmmss");
protected static String uniqueDateString() {
- String c = "" + fileCounter;
+ String c = Integer.toString(fileCounter);
fileCounter++; if (fileCounter>9999) fileCounter = 0;
while (c.length() < 4) { c = "0" + c; }
return "FILE" + DateFileNameFormatter.format(httpc.nowDate()) + c;
diff --git a/source/de/anomic/net/ftpc.java b/source/de/anomic/net/ftpc.java
index ef5f19149..394bb21e9 100644
--- a/source/de/anomic/net/ftpc.java
+++ b/source/de/anomic/net/ftpc.java
@@ -882,7 +882,7 @@ cd ..
else s = s + "?";
if (inode.canRead()) s = s + "r"; else s = s + "-";
if (inode.canWrite()) s = s + "w"; else s = s + "-";
- s = s + " " + lenformatted("" + inode.length(),9);
+ s = s + " " + lenformatted(Long.toString(inode.length()),9);
DateFormat df = DateFormat.getDateTimeInstance();
s = s + " " + df.format(new Date(inode.lastModified()));
s = s + " " + inode.getName();
diff --git a/source/de/anomic/plasma/plasmaCondenser.java b/source/de/anomic/plasma/plasmaCondenser.java
index 6066df400..338ef1ef1 100644
--- a/source/de/anomic/plasma/plasmaCondenser.java
+++ b/source/de/anomic/plasma/plasmaCondenser.java
@@ -123,12 +123,12 @@ public class plasmaCondenser {
this.hash = new HashSet();
}
public void inc() {count++;}
- public void check(int i) {hash.add("" + i);}
+ public void check(int i) {hash.add(Integer.toString(i));}
}
- public static String intString(int number, int length) {
- String s = "" + number;
+ public String intString(int number, int length) {
+ String s = Integer.toString(number);
while (s.length() < length) s = "0" + s;
return s;
}
diff --git a/source/de/anomic/plasma/plasmaCrawlProfile.java b/source/de/anomic/plasma/plasmaCrawlProfile.java
index 30309afac..ee08ffb78 100644
--- a/source/de/anomic/plasma/plasmaCrawlProfile.java
+++ b/source/de/anomic/plasma/plasmaCrawlProfile.java
@@ -169,15 +169,15 @@ public class plasmaCrawlProfile {
boolean storeHTCache, boolean storeTXCache,
boolean localIndexing, boolean remoteIndexing,
boolean xsstopw, boolean xdstopw, boolean xpstopw) {
- String handle = serverCodings.encodeMD5B64("" + System.currentTimeMillis(), true).substring(0, plasmaURL.urlCrawlProfileHandleLength);
+ String handle = serverCodings.encodeMD5B64(Long.toString(System.currentTimeMillis()), true).substring(0, plasmaURL.urlCrawlProfileHandleLength);
mem = new HashMap();
mem.put("handle", handle);
mem.put("name", name);
mem.put("startURL", startURL);
mem.put("generalFilter", generalFilter);
mem.put("specificFilter", specificFilter);
- mem.put("generalDepth", "" + generalDepth);
- mem.put("specificDepth", "" + specificDepth);
+ mem.put("generalDepth", Integer.toString(generalDepth));
+ mem.put("specificDepth", Integer.toString(specificDepth));
mem.put("crawlingQ", (crawlingQ) ? "true" : "false"); // crawling of urls with '?'
mem.put("storeHTCache", (storeHTCache) ? "true" : "false");
mem.put("storeTXCache", (storeTXCache) ? "true" : "false");
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index 771db90c7..b81ff55eb 100644
--- a/source/de/anomic/plasma/plasmaSwitchboard.java
+++ b/source/de/anomic/plasma/plasmaSwitchboard.java
@@ -893,8 +893,8 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
log.logDebug("processResourceStack processCase=" + processCase +
", depth=" + entry.depth() +
- ", maxDepth=" + ((entry.profile() == null) ? "null" : "" + entry.profile().generalDepth()) +
- ", filter=" + ((entry.profile() == null) ? "null" : "" + entry.profile().generalFilter()) +
+ ", maxDepth=" + ((entry.profile() == null) ? "null" : Integer.toString(entry.profile().generalDepth())) +
+ ", filter=" + ((entry.profile() == null) ? "null" : entry.profile().generalFilter()) +
", initiatorHash=" + initiatorHash +
", responseHeader=" + ((entry.responseHeader() == null) ? "null" : entry.responseHeader().toString()) +
", url=" + entry.url()); // DEBUG
@@ -1321,7 +1321,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
prop.put("totalcount", "0");
prop.put("linkcount", "0");
} else {
- prop.put("totalcount", "" + acc.sizeOrdered());
+ prop.put("totalcount", Integer.toString(acc.sizeOrdered()));
int i = 0;
int p;
URL url;
@@ -1414,8 +1414,8 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
System.out.println(" all words = " + ref.getElementCount() + ", total count = " + ref.getTotalCount());
*/
prop.put("references", ws);
- prop.put("linkcount", "" + i);
- prop.put("results", "" + i);
+ prop.put("linkcount", Integer.toString(i));
+ prop.put("results", Integer.toString(i));
}
// log
@@ -1446,7 +1446,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
prop.put("linkcount", "0");
prop.put("references", "");
} else {
- prop.put("totalcount", "" + acc.sizeOrdered());
+ prop.put("totalcount", Integer.toString(acc.sizeOrdered()));
int i = 0;
StringBuffer links = new StringBuffer();
String resource = "";
@@ -1471,7 +1471,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
}
}
prop.put("links", links.toString());
- prop.put("linkcount", "" + i);
+ prop.put("linkcount", Integer.toString(i));
// prepare reference hints
Object[] ws = acc.getReferences(16);
@@ -1502,7 +1502,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
if (actionName.equals("urlcount")) {
serverObjects result = new serverObjects();
- result.put("urls","" + urlPool.loadedURL.size());
+ result.put("urls", Integer.toString(urlPool.loadedURL.size()));
return result;
}
diff --git a/source/de/anomic/plasma/plasmaWordIndexAssortment.java b/source/de/anomic/plasma/plasmaWordIndexAssortment.java
index 4a490b2ba..16abd884c 100644
--- a/source/de/anomic/plasma/plasmaWordIndexAssortment.java
+++ b/source/de/anomic/plasma/plasmaWordIndexAssortment.java
@@ -82,7 +82,7 @@ public final class plasmaWordIndexAssortment {
private int bufferStructureLength;
private static String intx(int x) {
- String s = "" + x;
+ String s = Integer.toString(x);
while (s.length() < 3) s = "0" + s;
return s;
}
diff --git a/source/de/anomic/plasma/plasmaWordIndexCache.java b/source/de/anomic/plasma/plasmaWordIndexCache.java
index e2faca2a0..b26b08849 100644
--- a/source/de/anomic/plasma/plasmaWordIndexCache.java
+++ b/source/de/anomic/plasma/plasmaWordIndexCache.java
@@ -215,6 +215,7 @@ public final class plasmaWordIndexCache implements plasmaWordIndexInterface {
while (i-- > 0) {
// get out one entry
row = dumpArray.get(i);
+ if (row[0] == null) continue;
wordHash = new String(row[0]);
creationTime = kelondroRecords.bytes2long(row[2]);
wordEntry = new plasmaWordIndexEntry(new String(row[3]), new String(row[4]));
diff --git a/source/de/anomic/server/serverAbstractSwitch.java b/source/de/anomic/server/serverAbstractSwitch.java
index 8446148c7..ee6e48f10 100644
--- a/source/de/anomic/server/serverAbstractSwitch.java
+++ b/source/de/anomic/server/serverAbstractSwitch.java
@@ -132,7 +132,7 @@ public abstract class serverAbstractSwitch implements serverSwitch {
}
public void setConfig(String key, long value) {
- setConfig(key, "" + value);
+ setConfig(key, Long.toString(value));
}
public void setConfig(String key, String value) {
diff --git a/source/de/anomic/server/serverDate.java b/source/de/anomic/server/serverDate.java
index 0d70dbd69..31afb0090 100644
--- a/source/de/anomic/server/serverDate.java
+++ b/source/de/anomic/server/serverDate.java
@@ -219,14 +219,6 @@ public final class serverDate {
return new String(result);
}
- /*
- private static String format(int c, int len) {
- String s = "" + c;
- while (s.length() < len) s = "0" + s;
- return s;
- }
- */
-
// the following is only here to compare the kelondroDate with java-Date:
private static TimeZone GMTTimeZone = TimeZone.getTimeZone("GMT");
private static Calendar gregorian = new GregorianCalendar(GMTTimeZone);
diff --git a/source/de/anomic/server/serverObjects.java b/source/de/anomic/server/serverObjects.java
index 72f4a01ff..3b7ef9a74 100644
--- a/source/de/anomic/server/serverObjects.java
+++ b/source/de/anomic/server/serverObjects.java
@@ -105,7 +105,7 @@ public final class serverObjects extends Hashtable implements Cloneable {
// long variant
public long put(String key, long value) {
- String result = this.put(key, "" + value);
+ String result = this.put(key, Long.toString(value));
if (result == null) return 0; else try {
return Long.parseLong(result);
} catch (NumberFormatException e) {
@@ -118,7 +118,7 @@ public final class serverObjects extends Hashtable implements Cloneable {
String c = (String) super.get(key);
if (c == null) c = "0";
long l = Long.parseLong(c) + 1;
- super.put(key, "" + l);
+ super.put(key, Long.toString(l));
return l;
}
diff --git a/source/de/anomic/tools/disorderHeap.java b/source/de/anomic/tools/disorderHeap.java
index fe673f3b0..0e9683568 100644
--- a/source/de/anomic/tools/disorderHeap.java
+++ b/source/de/anomic/tools/disorderHeap.java
@@ -55,7 +55,7 @@ public class disorderHeap {
// create a disorder heap with numbers in it
// the numbers are 0..numbers-1
this();
- for (int i = 0; i < numbers; i++) add("" + i);
+ for (int i = 0; i < numbers; i++) add(Integer.toString(i));
}
public synchronized void add(Object element) {
diff --git a/source/de/anomic/yacy/yacyClient.java b/source/de/anomic/yacy/yacyClient.java
index 2897f2d5e..fa3d3ba3c 100644
--- a/source/de/anomic/yacy/yacyClient.java
+++ b/source/de/anomic/yacy/yacyClient.java
@@ -307,7 +307,7 @@ public class yacyClient {
obj.put("resource", ((global) ? "global" : "local"));
obj.put("query", wordhashes);
obj.put("ttl", "0");
- obj.put("duetime", "" + duetime);
+ obj.put("duetime", Long.toString(duetime));
obj.put("mytime", yacyCore.universalDateShortString());
//yacyCore.log.logDebug("yacyClient.search url=" + url);
long timestamp = System.currentTimeMillis();
@@ -376,7 +376,7 @@ public class yacyClient {
// generate statistics
long searchtime;
try {
- searchtime = Integer.parseInt("" + (String) result.get("searchtime"));
+ searchtime = Integer.parseInt((String) result.get("searchtime"));
} catch (NumberFormatException e) {
searchtime = totalrequesttime;
}
@@ -617,7 +617,7 @@ public class yacyClient {
post.put("key", key);
post.put("iam", yacyCore.seedDB.mySeed.hash);
post.put("youare", targetSeed.hash);
- post.put("wordc", "" + indexes.length);
+ post.put("wordc", Integer.toString(indexes.length));
int indexcount = 0;
String entrypost = "";
Enumeration eenum;
@@ -666,7 +666,7 @@ public class yacyClient {
}
}
- post.put("entryc", "" + indexcount);
+ post.put("entryc", Integer.toString(indexcount));
post.put("indexes", entrypost);
try {
Vector v = httpc.wput(new URL("http://" + address + "/yacy/transferRWI.html"), 60000, null, null,
@@ -678,7 +678,7 @@ public class yacyClient {
HashMap result = nxTools.table(v);
result.put("$URLCACHE$", urlCache);
- result.put("$UNKNOWNC$", "" + unknownURLs.size());
+ result.put("$UNKNOWNC$", Integer.toString(unknownURLs.size()));
return result;
} catch (Exception e) {
yacyCore.log.logError("yacyClient.transferRWI error:" + e.getMessage());
@@ -707,7 +707,7 @@ public class yacyClient {
}
}
}
- post.put("urlc", "" + urlc);
+ post.put("urlc", Integer.toString(urlc));
try {
Vector v = httpc.wput(new URL("http://" + address + "/yacy/transferURL.html"), 60000, null, null,
yacyCore.seedDB.sb.remoteProxyHost, yacyCore.seedDB.sb.remoteProxyPort, post);
diff --git a/source/de/anomic/yacy/yacyNewsRecord.java b/source/de/anomic/yacy/yacyNewsRecord.java
index ab2c5405a..bf3bf33cc 100644
--- a/source/de/anomic/yacy/yacyNewsRecord.java
+++ b/source/de/anomic/yacy/yacyNewsRecord.java
@@ -105,7 +105,7 @@ public class yacyNewsRecord {
if (this.category != null) attributes.put("cat", this.category);
if (this.created != null) attributes.put("cre", yacyCore.universalDateShortString(this.created));
if (this.received != null) attributes.put("rec", yacyCore.universalDateShortString(this.received));
- attributes.put("dis", "" + this.distributed);
+ attributes.put("dis", Integer.toString(this.distributed));
String theString = attributes.toString();
removeStandards();
return theString;
diff --git a/source/de/anomic/yacy/yacyPeerActions.java b/source/de/anomic/yacy/yacyPeerActions.java
index a95e635ab..6e527e445 100644
--- a/source/de/anomic/yacy/yacyPeerActions.java
+++ b/source/de/anomic/yacy/yacyPeerActions.java
@@ -107,13 +107,13 @@ public class yacyPeerActions {
}
long uptime = ((yacyCore.universalTime() - Long.parseLong(sb.getConfig("startupTime", "0"))) / 1000) / 60;
long indexedc = sb.getThread("80_indexing").getBusyCycles();
- seedDB.mySeed.put("ISpeed", ((indexedc == 0) || (uptime == 0)) ? "unknown" : ("" + (indexedc / uptime))); // the speed of indexing (pages/minute) of the peer
- seedDB.mySeed.put("Uptime", "" + uptime); // the number of minutes that the peer is up in minutes/day (moving average MA30)
- seedDB.mySeed.put("LCount", "" + sb.urlPool.loadedURL.size()); // the number of links that the peer has stored (LURL's)
- seedDB.mySeed.put("NCount", "" + sb.urlPool.noticeURL.stackSize()); // the number of links that the peer has noticed, but not loaded (NURL's)
- seedDB.mySeed.put("ICount", "" + sb.cacheSizeMin()); // the minimum number of words that the peer has indexed (as it says)
- seedDB.mySeed.put("SCount", "" + seedDB.sizeConnected()); // the number of seeds that the peer has stored
- seedDB.mySeed.put("CCount", "" + (((int) ((seedDB.sizeConnected() + seedDB.sizeDisconnected() + seedDB.sizePotential()) * 60.0 / (uptime + 1.01)) * 100) / 100.0)); // the number of clients that the peer connects (as connects/hour)
+ seedDB.mySeed.put("ISpeed", ((indexedc == 0) || (uptime == 0)) ? "unknown" : Long.toString(indexedc / uptime)); // the speed of indexing (pages/minute) of the peer
+ seedDB.mySeed.put("Uptime", Long.toString(uptime)); // the number of minutes that the peer is up in minutes/day (moving average MA30)
+ seedDB.mySeed.put("LCount", Integer.toString(sb.urlPool.loadedURL.size())); // the number of links that the peer has stored (LURL's)
+ seedDB.mySeed.put("NCount", Integer.toString(sb.urlPool.noticeURL.stackSize())); // the number of links that the peer has noticed, but not loaded (NURL's)
+ seedDB.mySeed.put("ICount", Integer.toString(sb.cacheSizeMin())); // the minimum number of words that the peer has indexed (as it says)
+ seedDB.mySeed.put("SCount", Integer.toString(seedDB.sizeConnected())); // the number of seeds that the peer has stored
+ seedDB.mySeed.put("CCount", Double.toString(((int) ((seedDB.sizeConnected() + seedDB.sizeDisconnected() + seedDB.sizePotential()) * 60.0 / (uptime + 1.01)) * 100) / 100.0)); // the number of clients that the peer connects (as connects/hour)
seedDB.mySeed.put("Version", sb.getConfig("version", ""));
if (seedDB.mySeed.get("PeerType","").equals("principal")) {
// attach information about seed location
diff --git a/source/de/anomic/yacy/yacySeed.java b/source/de/anomic/yacy/yacySeed.java
index 7237f72c2..799ae1b40 100644
--- a/source/de/anomic/yacy/yacySeed.java
+++ b/source/de/anomic/yacy/yacySeed.java
@@ -164,19 +164,19 @@ public class yacySeed {
public void incSI(int count) {
String v = (String) dna.get("sI"); if (v == null) v = "0";
- dna.put("sI", "" + (Integer.parseInt(v) + count));
+ dna.put("sI", Integer.toString(Integer.parseInt(v) + count));
}
public void incRI(int count) {
String v = (String) dna.get("rI"); if (v == null) v = "0";
- dna.put("rI", "" + (Integer.parseInt(v) + count));
+ dna.put("rI", Integer.toString(Integer.parseInt(v) + count));
}
public void incSU(int count) {
String v = (String) dna.get("sU"); if (v == null) v = "0";
- dna.put("sU", "" + (Integer.parseInt(v) + count));
+ dna.put("sU", Integer.toString(Integer.parseInt(v) + count));
}
public void incRU(int count) {
String v = (String) dna.get("rU"); if (v == null) v = "0";
- dna.put("rU", "" + (Integer.parseInt(v) + count));
+ dna.put("rU", Integer.toString(Integer.parseInt(v) + count));
}
// 12 * 6 bit = 72 bit = 9 byte
@@ -317,7 +317,7 @@ public class yacySeed {
sp.getProperty("java.version","") +
sp.getProperty("os.version","") +
sb.getConfig("peerName", "noname");
- String fast = "" + System.currentTimeMillis();
+ String fast = Long.toString(System.currentTimeMillis());
// the resultinh hash does not have any information than can be used to reconstruct the
// original system information that has been collected here to create the hash
// We simply distinuguish three parts of the hash: slow, medium and fast changing character of system idenfification
diff --git a/source/yacy.java b/source/yacy.java
index c030fae81..fe4f4418f 100644
--- a/source/yacy.java
+++ b/source/yacy.java
@@ -140,11 +140,11 @@ public final class yacy {
long svn;
try {svn = (long) (100000000.0 * Double.parseDouble(s));} catch (NumberFormatException ee) {svn = 0;}
double version = (Math.floor((double) svn / (double) 100000) / (double) 1000);
- String vStr = (version < 0.11) ? "dev" : "" + version;
+ String vStr = (version < 0.11) ? "dev" : Double.toString(version);
//while (vStr.length() < 5) vStr = vStr + "0";
svn = svn % 100000;
if (svn > 4000) svn=svn / 10; // fix a previous bug online
- String svnStr = "" + svn;
+ String svnStr = Long.toString(svn);
while (svnStr.length() < 5) svnStr = "0" + svnStr;
return vStr + "/" + svnStr;
}
@@ -235,10 +235,10 @@ public final class yacy {
System.err.println("Unable to determine the currently used SVN revision number.");
}
- sb.setConfig("version", "" + version);
+ sb.setConfig("version", Float.toString(version));
sb.setConfig("vdate", vDATE);
sb.setConfig("applicationRoot", homePath);
- sb.setConfig("startupTime", "" + startup);
+ sb.setConfig("startupTime", Long.toString(startup));
serverLog.logSystem("STARTUP", "YACY Version: " + version + ", Built " + vDATE);
yacyCore.latestVersion = (float) version;