From d31fb8b83fa52d3d0adf4df4c626d4bac1a6b21f Mon Sep 17 00:00:00 2001 From: peter Date: Thu, 21 May 2015 08:04:23 +0200 Subject: [PATCH] assert that index queries are to be performed in a read action --- .../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 c6bb7c5048c4..315b24819392 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndexImpl.java @@ -804,7 +804,8 @@ public class FileBasedIndexImpl extends FileBasedIndex { @Nullable GlobalSearchScope filter, @Nullable VirtualFile restrictedFile) { ProgressManager.checkCanceled(); - myContentlessIndicesUpdateQueue.ensureUpToDate(); // some content full indices depends on contentless ones + myContentlessIndicesUpdateQueue.ensureUpToDate(); // some contentful indices depends on contentless ones + ApplicationManager.getApplication().assertReadAccessAllowed(); if (!needsFileContentLoading(indexId)) { return; //indexed eagerly in foreground while building unindexed file list }