Skip to content

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

fix for multiple thread dump

orbiter859c99886c26
diff --git a/source/net/yacy/kelondro/logging/ThreadDump.java b/source/net/yacy/kelondro/logging/ThreadDump.java
index 3b7a3eaf9..5742af0f4 100644
--- a/source/net/yacy/kelondro/logging/ThreadDump.java
+++ b/source/net/yacy/kelondro/logging/ThreadDump.java
@@ -310,15 +310,13 @@ public class ThreadDump extends HashMap<ThreadDump.Thread, List<String>> impleme
final java.lang.Thread.State stateIn) {
final Map<String, Integer> result = new HashMap<String, Integer>();
ThreadDump x;
- int count;
for (final Map<java.lang.Thread,StackTraceElement[]> trace: stackTraces) {
x = new ThreadDump(rootPath, trace, plain, stateIn);
for (final Entry<Thread, List<String>> e: x.entrySet()) {
- Integer c = result.get(e.getKey());
- count = e.getValue().size();
- if (c == null) result.put(e.getKey().name, Integer.valueOf(count));
+ Integer c = result.get(e.getKey().name);
+ if (c == null) result.put(e.getKey().name, Integer.valueOf(1));
else {
- c = Integer.valueOf(c.intValue() + count);
+ c = Integer.valueOf(c.intValue() + 1);
result.put(e.getKey().name, c);
}
}