mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Cleanup (typo; dead code)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user