From 4477d0efa20ab8fc95e56d4ce35c2cbaa6191006 Mon Sep 17 00:00:00 2001 From: Eugene Zhuravlev Date: Fri, 19 Nov 2010 17:44:40 +0300 Subject: [PATCH] single lock --- .../intellij/openapi/vfs/newvfs/persistent/FSRecords.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java index 88de9c6d37b7..dcf7f2ac5413 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/FSRecords.java @@ -98,7 +98,6 @@ public class FSRecords implements Forceable { private static class DbConnection { private static int refCount = 0; - private static final Object LOCK = new Object(); private static final TObjectIntHashMap myAttributeIds = new TObjectIntHashMap(); private static PersistentStringEnumerator myNames; @@ -112,7 +111,7 @@ public class FSRecords implements Forceable { private static boolean myCorrupted = false; public static DbConnection connect() { - synchronized (LOCK) { + synchronized (lock) { if (refCount == 0) { init(); scanFreeRecords(); @@ -368,7 +367,7 @@ public class FSRecords implements Forceable { } public void dispose() throws IOException { - synchronized (LOCK) { + synchronized (lock) { refCount--; if (refCount == 0) { closeFiles();