diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java index f49fd3a1345f..e2a65a01ab02 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/impl/local/FileWatcher.java @@ -91,14 +91,9 @@ public class FileWatcher { private final Object myLock = new Object(); private DirtyPaths myDirtyPaths = new DirtyPaths(); - private final String[] myLastChangedPathes = new String[2]; + private final String[] myLastChangedPaths = new String[2]; private int myLastChangedPathIndex; - /** @deprecated use {@linkplain com.intellij.openapi.vfs.impl.local.LocalFileSystemImpl#getFileWatcher()} (to remove in IDEA 13) */ - public static FileWatcher getInstance() { - return ((LocalFileSystemImpl)LocalFileSystem.getInstance()).getFileWatcher(); - } - FileWatcher(@NotNull ManagingFS managingFS) { myManagingFS = managingFS; @@ -156,7 +151,7 @@ public class FileWatcher { DirtyPaths dirtyPaths = myDirtyPaths; myDirtyPaths = new DirtyPaths(); myLastChangedPathIndex = 0; - for(int i = 0; i < myLastChangedPathes.length; ++i) myLastChangedPathes[i] = null; + for(int i = 0; i < myLastChangedPaths.length; ++i) myLastChangedPaths[i] = null; return dirtyPaths; } } @@ -551,17 +546,17 @@ public class FileWatcher { LOG.info("Change requests:" + myChangeRequests + ", filtered:" + myFilteredRequests); } - for(int i = 0; i < myLastChangedPathes.length; ++i) { + for(int i = 0; i < myLastChangedPaths.length; ++i) { int last = myLastChangedPathIndex - i - 1; - if (last < 0) last += myLastChangedPathes.length; - String lastChangedPath = myLastChangedPathes[last]; + if (last < 0) last += myLastChangedPaths.length; + String lastChangedPath = myLastChangedPaths[last]; if (lastChangedPath != null && lastChangedPath.equals(path)) { ++myFilteredRequests; return; } } - myLastChangedPathes[myLastChangedPathIndex ++] = path; - if (myLastChangedPathIndex == myLastChangedPathes.length) myLastChangedPathIndex = 0; + myLastChangedPaths[myLastChangedPathIndex ++] = path; + if (myLastChangedPathIndex == myLastChangedPaths.length) myLastChangedPathIndex = 0; } }