javac ast indices: read access while get placement of element in getHierarchyInfo()

This commit is contained in:
Dmitry Batkovich
2016-10-18 19:06:25 +03:00
parent 64352f8317
commit e40c4160d8
@@ -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);