IDEA-160977 Merge all similar threads

User's patch applied
This commit is contained in:
Vassiliy.Kudryashov
2018-03-20 15:54:40 +03:00
parent 1df5d696a2
commit e4ea25e63d
@@ -76,11 +76,14 @@ public class ThreadDumpPanel extends JPanel implements DataProvider {
ThreadState state = copy.get(i);
ThreadState.CompoundThreadState compound = new ThreadState.CompoundThreadState(state);
myMergedThreadDump.add(compound);
for (int j = i+1; j < copy.size(); j++) {
for (int j = i + 1; j < copy.size(); ) {
ThreadState toAdd = copy.get(j);
if (compound.add(toAdd)) {
copy.remove(j);
}
else {
j++;
}
}
}