use cache value out of PsiLock, part of ( IDEA-139921)

This commit is contained in:
Maxim.Mossienko
2015-05-05 11:43:09 +02:00
parent b4066052a3
commit 36b9b7886a
@@ -213,8 +213,9 @@ public class XmlPsiUtil {
final PsiFile targetFile,
final XmlEntityDecl.EntityContextType type,
final XmlEntityRef entityRef) {
CachedValue<PsiElement> value;
synchronized (PsiLock.LOCK) { // we depend on targetFile and entityRef
CachedValue<PsiElement> value = entityRef.getUserData(PARSED_DECL_KEY);
value = entityRef.getUserData(PARSED_DECL_KEY);
// return entityDecl.parse(targetFile, type);
if (value == null) {
@@ -229,11 +230,8 @@ public class XmlPsiUtil {
}, false);
entityRef.putUserData(PARSED_DECL_KEY, value);
}
return value.getValue();
}
return value.getValue();
}
}