From e40c4160d8d7259f850e0b069d429dfd4847167e Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Tue, 18 Oct 2016 17:46:57 +0300 Subject: [PATCH] javac ast indices: read access while get placement of element in getHierarchyInfo() --- .../compiler/backwardRefs/CompilerReferenceServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/compiler/impl/src/com/intellij/compiler/backwardRefs/CompilerReferenceServiceImpl.java b/java/compiler/impl/src/com/intellij/compiler/backwardRefs/CompilerReferenceServiceImpl.java index 93431408923c..ccf1cbdbf8a6 100644 --- a/java/compiler/impl/src/com/intellij/compiler/backwardRefs/CompilerReferenceServiceImpl.java +++ b/java/compiler/impl/src/com/intellij/compiler/backwardRefs/CompilerReferenceServiceImpl.java @@ -211,7 +211,7 @@ public class CompilerReferenceServiceImpl extends CompilerReferenceService imple if (directInheritorsAndCandidates == null) return null; GlobalSearchScope dirtyScope = myDirtyModulesHolder.getDirtyScope(); - if (ElementPlace.LIB == ElementPlace.get(aClass.getContainingFile().getVirtualFile(), myProjectFileIndex)) { + if (ElementPlace.LIB == ReadAction.compute(() -> ElementPlace.get(aClass.getContainingFile().getVirtualFile(), myProjectFileIndex))) { dirtyScope = dirtyScope.union(LibraryScopeCache.getInstance(myProject).getLibrariesOnlyScope()); } return new CompilerHierarchyInfoImpl<>(directInheritorsAndCandidates, dirtyScope, searchScope);