IJPL-149317 More explicit locks.

GitOrigin-RevId: 8564e9e1b352a77c3ca0d44470fdbbda5f1e9c49
This commit is contained in:
Lev Serebryakov
2024-09-19 14:04:25 +02:00
committed by intellij-monorepo-bot
parent e6326e86a6
commit 6400f70dde

View File

@@ -782,9 +782,11 @@ public class FoldingModelSupport {
private FoldingCache getFoldingCache(@NotNull Settings settings) {
//noinspection unchecked
List<FoldedGroupState>[] result = new List[myCount];
for (int i = 0; i < myCount; i++) {
result[i] = collectFoldedGroupsStates(i);
}
ReadAction.run(() -> {
for (int i = 0; i < myCount; i++) {
result[i] = collectFoldedGroupsStates(i);
}
});
return new FoldingCache(result, settings.defaultExpanded);
}