Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

- fix for http://forum.yacy-websuche.de/viewtopic.php?f=6&t=1140&p=7626#p7626 - less dots for ppm bar in watchcrawler (one dot for each 10 ppm)

orbiter01b3e9431ad2
diff --git a/build.properties b/build.properties
index 1278199c4..a0344e219 100644
--- a/build.properties
+++ b/build.properties
@@ -3,7 +3,7 @@ javacSource=1.5
javacTarget=1.5
# Release Configuration
-releaseVersion=0.585
+releaseVersion=0.586
stdReleaseFile=yacy_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
embReleaseFile=yacy_emb_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
proReleaseFile=yacy_pro_v${releaseVersion}_${DSTAMP}_${releaseNr}.tar.gz
diff --git a/htroot/js/WatchCrawler.js b/htroot/js/WatchCrawler.js
index 96f9d4691..3f205c025 100644
--- a/htroot/js/WatchCrawler.js
+++ b/htroot/js/WatchCrawler.js
@@ -72,7 +72,7 @@ function handleStatus(){
var ppmSpan = document.getElementById("ppmSpan");
removeAllChildren(ppmSpan);
- for(i=0;i<ppm;i++){
+ for(i = 0; i < ppm / 10; i++){
img=document.createElement("img");
img.setAttribute("src", BAR_IMG1);
ppmSpan.appendChild(img);
diff --git a/htroot/yacy/hello.java b/htroot/yacy/hello.java
index 2392600fb..23fa37a0b 100644
--- a/htroot/yacy/hello.java
+++ b/htroot/yacy/hello.java
@@ -210,11 +210,15 @@ public final class hello {
seeds.ensureCapacity((ySeeds.size() + 1) * 768);
Iterator<yacySeed> si = ySeeds.values().iterator();
yacySeed s;
+ String seedString;
while (si.hasNext()) {
s = si.next();
if ((s != null) && (s.isProper() == null)) try {
- seeds.append("seed").append(count).append('=').append(s.genSeedStr(key)).append(serverCore.CRLF_STRING);
- count++;
+ seedString = s.genSeedStr(key);
+ if (seedString != null) {
+ seeds.append("seed").append(count).append('=').append(seedString).append(serverCore.CRLF_STRING);
+ count++;
+ }
} catch (ConcurrentModificationException e) {
e.printStackTrace();
}
diff --git a/source/de/anomic/server/serverCodings.java b/source/de/anomic/server/serverCodings.java
index a6320b045..db704a7aa 100644
--- a/source/de/anomic/server/serverCodings.java
+++ b/source/de/anomic/server/serverCodings.java
@@ -51,6 +51,7 @@ import java.io.FileInputStream;
import java.io.InputStream;
import java.security.MessageDigest;
import java.util.Collections;
+import java.util.ConcurrentModificationException;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@@ -199,10 +200,21 @@ public final class serverCodings {
synchronized (m) {
final StringBuffer buf = new StringBuffer(20 * m.size());
if (braces) { buf.append("{"); }
- for (Entry<String, String> e: m.entrySet()) {
- buf.append(e.getKey()).append('=');
- if (e.getValue() != null) { buf.append(e.getValue()); }
- buf.append(separator);
+ int retry = 10;
+ critical: while (retry > 0) {
+ try {
+ for (Entry<String, String> e: m.entrySet()) {
+ buf.append(e.getKey()).append('=');
+ if (e.getValue() != null) { buf.append(e.getValue()); }
+ buf.append(separator);
+ }
+ break critical; // success
+ } catch (ConcurrentModificationException e) {
+ // retry
+ buf.setLength(1);
+ retry--;
+ }
+ buf.setLength(1); // fail
}
if (buf.length() > 1) { buf.setLength(buf.length() - 1); } // remove last separator
if (braces) { buf.append("}"); }