[vcs-log] minor: change singature so that all PersistentUtil methods had the same parameters order: storageId, logKind, version

This commit is contained in:
Julia Beliaeva
2016-06-25 20:48:33 +03:00
parent 836ac7fd4d
commit 1a39f68b3b
2 changed files with 5 additions and 5 deletions
@@ -96,7 +96,7 @@ public class VcsLogHashMapImpl implements Disposable, VcsLogHashMap {
// cleanup old root storages, to remove after 2016.3 release
PersistentUtil
.cleanupOldStorageFile(project.getName() + "." + project.getBaseDir().getPath().hashCode(), ROOT_STORAGE_KIND, ROOTS_STORAGE_VERSION);
.cleanupOldStorageFile(ROOT_STORAGE_KIND, project.getName() + "." + project.getBaseDir().getPath().hashCode(), ROOTS_STORAGE_VERSION);
Disposer.register(parent, this);
}
@@ -45,7 +45,7 @@ public class PersistentUtil {
}
@NotNull
private static File getStorageFile(@NotNull String logId, @NotNull String storageKind, int version) {
private static File getStorageFile(@NotNull String storageKind, @NotNull String logId, int version) {
File subdir = new File(LOG_CACHE, storageKind);
String safeLogId = PathUtilRt.suggestFileName(logId, true, true);
final File mapFile = new File(subdir, safeLogId + "." + version);
@@ -55,8 +55,8 @@ public class PersistentUtil {
return mapFile;
}
public static void cleanupOldStorageFile(@NotNull String logId, @NotNull String storageKind, int version) {
IOUtil.deleteAllFilesStartingWith(getStorageFile(logId, storageKind, version));
public static void cleanupOldStorageFile(@NotNull String storageKind, @NotNull String logId, int version) {
IOUtil.deleteAllFilesStartingWith(getStorageFile(storageKind, logId, version));
}
@NotNull
@@ -64,7 +64,7 @@ public class PersistentUtil {
@NotNull String storageKind,
@NotNull String logId,
int version) throws IOException {
File storageFile = getStorageFile(logId, storageKind, version);
File storageFile = getStorageFile(storageKind, logId, version);
return IOUtil.openCleanOrResetBroken(() -> new PersistentEnumerator<>(storageFile, keyDescriptor, Page.PAGE_SIZE), storageFile);
}