From 3e751e0af4dcde3ea0f2ae21ef38ea6fe9eb2147 Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Wed, 4 Dec 2019 09:22:47 +0300 Subject: [PATCH] dont throw IllegalStateException on index access in dumb mode GitOrigin-RevId: e6f0c7a732608bba142c3f295563d35986767aad --- .../src/com/intellij/util/indexing/FileBasedIndexImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java index a885b6e3e117..a591217dd3ae 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java @@ -2657,7 +2657,8 @@ public final class FileBasedIndexImpl extends FileBasedIndex { DumbModeAccessType dumbModeAccessType = getCurrentDumbModeAccessType(); if (dumbModeAccessType == null) { - throw new IllegalStateException("index access is not allowed in dumb mode"); + //throw new IllegalStateException("index access is not allowed in dumb mode"); + return f -> true; } if (dumbModeAccessType == DumbModeAccessType.RAW_INDEX_DATA_ACCEPTABLE) return f -> true;