From ada67d3949a9bd86dcdbb4c20f11ef4e9dc5152c Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 4 Mar 2019 08:03:32 +0100 Subject: [PATCH] IdempotenceChecker: ignore ConcurrentMap because it can be filled up later lazily (OC-18384) --- .../core-impl/src/com/intellij/util/IdempotenceChecker.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/platform/core-impl/src/com/intellij/util/IdempotenceChecker.java b/platform/core-impl/src/com/intellij/util/IdempotenceChecker.java index c9a419ad9180..7f3d16c22a38 100644 --- a/platform/core-impl/src/com/intellij/util/IdempotenceChecker.java +++ b/platform/core-impl/src/com/intellij/util/IdempotenceChecker.java @@ -17,6 +17,7 @@ import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.*; +import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ThreadLocalRandom; public class IdempotenceChecker { @@ -98,6 +99,9 @@ public class IdempotenceChecker { return whichIsField("size", existing, fresh, checkCollectionSizes(((Set)existing).size(), ((Set)fresh).size())); } if (existing instanceof Map) { + if (existing instanceof ConcurrentMap) { + return null; // likely to be filled lazily + } return whichIsField("size", existing, fresh, checkCollectionSizes(((Map)existing).size(), ((Map)fresh).size())); } if (existing instanceof PsiNamedElement) {