From b12aa86b503c77bd1dde7ddd2d1783d392ceb84f Mon Sep 17 00:00:00 2001 From: Alexey Utkin Date: Thu, 23 Mar 2017 19:57:39 +0300 Subject: [PATCH] fix for: show project leaking path in tests Alexey Kudravtsev 23.03.2017 14:41 --- .../src/com/intellij/testFramework/PlatformTestCase.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/testFramework/src/com/intellij/testFramework/PlatformTestCase.java b/platform/testFramework/src/com/intellij/testFramework/PlatformTestCase.java index 2744a664de96..9dea59c61abe 100644 --- a/platform/testFramework/src/com/intellij/testFramework/PlatformTestCase.java +++ b/platform/testFramework/src/com/intellij/testFramework/PlatformTestCase.java @@ -389,11 +389,11 @@ public abstract class PlatformTestCase extends UsefulTestCase implements DataPro } public static void cleanupApplicationCaches(Project project) { - UndoManagerImpl globalInstance = (UndoManagerImpl)UndoManager.getGlobalInstance(); - if (globalInstance != null) { - globalInstance.dropHistoryInTests(); - } if (project != null && !project.isDisposed()) { + UndoManagerImpl globalInstance = (UndoManagerImpl)UndoManager.getGlobalInstance(); + if (globalInstance != null) { + globalInstance.dropHistoryInTests(); + } ((UndoManagerImpl)UndoManager.getInstance(project)).dropHistoryInTests(); ((DocumentReferenceManagerImpl)DocumentReferenceManager.getInstance()).cleanupForNextTest();