Cheaper lock

This commit is contained in:
Maxim Shafirov
2010-08-03 13:04:19 +04:00
parent 289e8164e6
commit 3f4fb7fd78
@@ -76,7 +76,7 @@ public abstract class PsiFileImpl extends ElementBase implements PsiFileEx, PsiF
protected PsiFile myOriginalFile = null;
private final FileViewProvider myViewProvider;
private static final Key<Document> HARD_REFERENCE_TO_DOCUMENT = new Key<Document>("HARD_REFERENCE_TO_DOCUMENT");
private final Object myStubLock = new String("file's stub lock");
private final Object myStubLock = new Object();
private SoftReference<StubTree> myStub;
protected final PsiManagerEx myManager;
private volatile Object myTreeElementPointer; // SoftReference/WeakReference to RepositoryTreeElement when has repository id, RepositoryTreeElement otherwise