From a4bca07989240eee0ced50f243f8d2f105ed6cbb Mon Sep 17 00:00:00 2001 From: Alexey Kudravtsev Date: Mon, 22 Jun 2015 15:16:48 +0300 Subject: [PATCH] file leaks in tests --- .../vcs/changes/conflicts/ChangelistConflictTracker.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/conflicts/ChangelistConflictTracker.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/conflicts/ChangelistConflictTracker.java index 2b1c712b0ebf..57b1da6b0ac5 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/conflicts/ChangelistConflictTracker.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/conflicts/ChangelistConflictTracker.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,7 @@ import com.intellij.openapi.editor.event.DocumentAdapter; import com.intellij.openapi.editor.event.DocumentEvent; import com.intellij.openapi.fileEditor.FileDocumentManager; import com.intellij.openapi.project.Project; +import com.intellij.openapi.project.impl.ProjectManagerImpl; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.Computable; import com.intellij.openapi.util.ZipperUpdater; @@ -209,7 +210,9 @@ public class ChangelistConflictTracker { public void startTracking() { myChangeListManager.addChangeListListener(myChangeListListener); - EditorFactory.getInstance().getEventMulticaster().addDocumentListener(myDocumentListener, myProject); + if (!ProjectManagerImpl.isLight(getProject())) { // we don't want to collect all light documents in tests + EditorFactory.getInstance().getEventMulticaster().addDocumentListener(myDocumentListener, myProject); + } } public void stopTracking() {