fix for multiple thread dump

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7603 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 14 years ago
parent 61acf55da4
commit 859c99886c

@ -310,15 +310,13 @@ public class ThreadDump extends HashMap<ThreadDump.Thread, List<String>> impleme
final java.lang.Thread.State stateIn) { final java.lang.Thread.State stateIn) {
final Map<String, Integer> result = new HashMap<String, Integer>(); final Map<String, Integer> result = new HashMap<String, Integer>();
ThreadDump x; ThreadDump x;
int count;
for (final Map<java.lang.Thread,StackTraceElement[]> trace: stackTraces) { for (final Map<java.lang.Thread,StackTraceElement[]> trace: stackTraces) {
x = new ThreadDump(rootPath, trace, plain, stateIn); x = new ThreadDump(rootPath, trace, plain, stateIn);
for (final Entry<Thread, List<String>> e: x.entrySet()) { for (final Entry<Thread, List<String>> e: x.entrySet()) {
Integer c = result.get(e.getKey()); Integer c = result.get(e.getKey().name);
count = e.getValue().size(); if (c == null) result.put(e.getKey().name, Integer.valueOf(1));
if (c == null) result.put(e.getKey().name, Integer.valueOf(count));
else { else {
c = Integer.valueOf(c.intValue() + count); c = Integer.valueOf(c.intValue() + 1);
result.put(e.getKey().name, c); result.put(e.getKey().name, c);
} }
} }

Loading…
Cancel
Save