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

This commit is contained in:
Dmitry Batkovich
2016-10-18 19:06:25 +03:00
parent e40c4160d8
commit 319a91bfc2
@@ -278,7 +278,7 @@ public class CompilerReferenceServiceImpl extends CompilerReferenceService imple
myReadDataLock.lock();
try {
if (myReader == null) return null;
VirtualFile file = PsiUtilCore.getVirtualFile(psiElement);
VirtualFile file = ReadAction.compute(() -> PsiUtilCore.getVirtualFile(psiElement));
ElementPlace place = ElementPlace.get(file, myProjectFileIndex);
if (place == null || (place == ElementPlace.SRC && myDirtyModulesHolder.contains(file))) {
return null;