IDEA-130959 (temp. fix for tests)
authorRoman Shevchenko <roman.shevchenko@jetbrains.com>
Tue, 11 Nov 2014 11:23:34 +0000 (12:23 +0100)
committerRoman Shevchenko <roman.shevchenko@jetbrains.com>
Tue, 11 Nov 2014 11:23:34 +0000 (12:23 +0100)
platform/core-impl/src/com/intellij/openapi/fileEditor/impl/LoadTextUtil.java

index edeb9423d190ede7eec99cb863f895bc44b24134..067efb9946e18facf2fa02eb1ebfe6651c619845 100644 (file)
@@ -375,7 +375,7 @@ public final class LoadTextUtil {
         CharSequence text;
 
         final Application app = ApplicationManager.getApplication();
-        if (app != null && app.isDispatchThread()) {
+        if (app != null && app.isDispatchThread() && !app.isUnitTestMode()) {
           final Ref<CharSequence> result = Ref.create(ArrayUtil.EMPTY_CHAR_SEQUENCE);
           final Ref<RuntimeException> exception = Ref.create();