fix non-atomic stubs update (EA-108953 - assert: PsiFileImpl.updateTrees)

This commit is contained in:
peter
2017-10-13 18:30:07 +02:00
parent a2902f502c
commit 0c8a7f382d
@@ -287,7 +287,9 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF
void reportStubAstMismatch(String message, StubTree stubTree) {
rebuildStub();
updateTrees(myTrees.clearStub(STUB_PSI_MISMATCH));
synchronized (myPsiLock) {
updateTrees(myTrees.clearStub(STUB_PSI_MISMATCH));
}
throw StubTreeLoader.getInstance().stubTreeAndIndexDoNotMatch(message, stubTree, this);
}