From 3fcf6ff7eb816492ff8a3219288bacff33dd5809 Mon Sep 17 00:00:00 2001 From: Aleksey Pivovarov Date: Fri, 13 May 2016 12:57:46 +0300 Subject: [PATCH] do not allow to run Task from non-EDT thread in tests this commit reverts e5b44d6d5a854cd299c447d779cff49ca3970819 --- .../openapi/progress/impl/CoreProgressManager.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/platform/core-impl/src/com/intellij/openapi/progress/impl/CoreProgressManager.java b/platform/core-impl/src/com/intellij/openapi/progress/impl/CoreProgressManager.java index 0d829583e765..afcea0adc8e1 100644 --- a/platform/core-impl/src/com/intellij/openapi/progress/impl/CoreProgressManager.java +++ b/platform/core-impl/src/com/intellij/openapi/progress/impl/CoreProgressManager.java @@ -301,12 +301,8 @@ public class CoreProgressManager extends ProgressManager implements Disposable { @Override public void run(@NotNull final Task task) { if (task.isHeadless()) { - if (ApplicationManager.getApplication().isDispatchThread()) { - runProcessWithProgressSynchronously(task, null); - } - else { - new TaskRunnable(task, new EmptyProgressIndicator()).run(); - } + ApplicationManager.getApplication().assertIsDispatchThread(); + runProcessWithProgressSynchronously(task, null); } else if (task.isModal()) { runProcessWithProgressSynchronously(task.asModal(), null);