mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[platform] check that read access is allowed when accessing ProjectFileIndex and ModuleFileIndex (IDEA-304640)
GitOrigin-RevId: 106e3c92300d2b372f4449804934e7b7ee79e244
This commit is contained in:
committed by
intellij-monorepo-bot
parent
fd18ff2b9a
commit
94c6d06f97
@@ -3,6 +3,7 @@ package com.intellij.openapi.roots.impl;
|
||||
|
||||
import com.intellij.model.ModelBranch;
|
||||
import com.intellij.openapi.Disposable;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.fileTypes.FileTypeRegistry;
|
||||
import com.intellij.openapi.module.Module;
|
||||
@@ -221,6 +222,7 @@ public final class DirectoryIndexImpl extends DirectoryIndex implements Disposab
|
||||
}
|
||||
|
||||
private void checkAvailability() {
|
||||
ApplicationManager.getApplication().assertReadAccessAllowed();
|
||||
if (myDisposed) {
|
||||
ProgressManager.checkCanceled();
|
||||
LOG.error("Directory index is already disposed for " + myProject);
|
||||
|
||||
@@ -56,6 +56,7 @@ internal class WorkspaceFileIndexData(contributorList: List<WorkspaceFileIndexCo
|
||||
if (hasDirtyEntities && ApplicationManager.getApplication().isWriteAccessAllowed) {
|
||||
updateDirtyEntities()
|
||||
}
|
||||
ApplicationManager.getApplication().assertReadAccessAllowed()
|
||||
nonIncrementalContributors.updateIfNeeded(fileSets)
|
||||
|
||||
val originalKindMask =
|
||||
|
||||
Reference in New Issue
Block a user