IncorrectOperationException: UnsafeWeakList is not RandomAccess

This commit is contained in:
Alexey Kudravtsev
2017-03-01 19:13:26 +03:00
parent 2b5487ff1a
commit 792855a44a
@@ -221,7 +221,7 @@ public class ProjectManagerImpl extends ProjectManagerEx implements Disposable {
if (getLeakedProjects().count() >= MAX_LEAKY_PROJECTS) {
List<Project> 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);
}
}