diff options
Diffstat (limited to 'platform/platform-impl/src/com/intellij/openapi/vfs')
-rw-r--r-- | platform/platform-impl/src/com/intellij/openapi/vfs/ex/temp/TempFileSystem.java | 5 | ||||
-rw-r--r-- | platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFSImpl.java | 13 |
2 files changed, 10 insertions, 8 deletions
diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/ex/temp/TempFileSystem.java b/platform/platform-impl/src/com/intellij/openapi/vfs/ex/temp/TempFileSystem.java index 1c6e173b45d1..33ecf625c05d 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/ex/temp/TempFileSystem.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/ex/temp/TempFileSystem.java @@ -136,7 +136,8 @@ public class TempFileSystem extends LocalFileSystemBase { } fsItem.getParent().removeChild(fsItem); - ((FSDir)newParentItem).addChild(fsItem); + newDir.addChild(fsItem); + fsItem.myParent = newDir; } @Override @@ -263,7 +264,7 @@ public class TempFileSystem extends LocalFileSystemBase { } private abstract static class FSItem { - private final FSDir myParent; + private FSDir myParent; private String myName; private long myTimestamp; private boolean myWritable; diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFSImpl.java b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFSImpl.java index d7b90178e7e8..db5de4258d41 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFSImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/persistent/PersistentFSImpl.java @@ -67,15 +67,16 @@ public class PersistentFSImpl extends PersistentFS implements ApplicationCompone private final Object myInputLock = new Object(); private final AtomicBoolean myShutDown = new AtomicBoolean(false); + @SuppressWarnings("FieldCanBeLocal") + private final LowMemoryWatcher myWatcher = LowMemoryWatcher.register(new Runnable() { + @Override + public void run() { + clearIdCache(); + } + }); public PersistentFSImpl(@NotNull MessageBus bus) { myEventBus = bus; - LowMemoryWatcher.register(new Runnable() { - @Override - public void run() { - clearIdCache(); - } - }); ShutDownTracker.getInstance().registerShutdownTask(new Runnable() { @Override public void run() { |