diff --git a/platform/usageView/src/com/intellij/usages/impl/GroupNode.java b/platform/usageView/src/com/intellij/usages/impl/GroupNode.java index 422d2fe52bf1..eed0d86b20a2 100644 --- a/platform/usageView/src/com/intellij/usages/impl/GroupNode.java +++ b/platform/usageView/src/com/intellij/usages/impl/GroupNode.java @@ -57,8 +57,10 @@ public class GroupNode extends Node implements Navigatable, Comparable children = myChildren; - return result + children.subList(0, Math.min(10, children.size())); + synchronized (this) { + List children = myChildren; + return result + children.subList(0, Math.min(10, children.size())); + } } @NotNull @@ -347,7 +349,7 @@ public class GroupNode extends Node implements Navigatable, Comparable getSubGroups() { + public synchronized Collection getSubGroups() { List list = new ArrayList<>(); for (Node n : myChildren) { if (n instanceof GroupNode) { @@ -358,7 +360,7 @@ public class GroupNode extends Node implements Navigatable, Comparable getUsageNodes() { + public synchronized Collection getUsageNodes() { List list = new ArrayList<>(); for (Node n : myChildren) { if (n instanceof UsageNode) {