From 792855a44a3cc228899a2158bf68412870beae9d Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Wed, 1 Mar 2017 19:00:32 +0300 Subject: [PATCH] IncorrectOperationException: UnsafeWeakList is not RandomAccess --- .../com/intellij/openapi/project/impl/ProjectManagerImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectManagerImpl.java b/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectManagerImpl.java index 0562b6995511..572820e7c8d4 100644 --- a/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectManagerImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/project/impl/ProjectManagerImpl.java @@ -221,7 +221,7 @@ public class ProjectManagerImpl extends ProjectManagerEx implements Disposable { if (getLeakedProjects().count() >= MAX_LEAKY_PROJECTS) { List copy = getLeakedProjects().collect(Collectors.toCollection(UnsafeWeakList::new)); myProjects.clear(); - if (copy.size() >= MAX_LEAKY_PROJECTS) { + if (getLeakedProjects().count() >= MAX_LEAKY_PROJECTS) { throw new TooManyProjectLeakedException(copy); } }