mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] minor: change singature so that all PersistentUtil methods had the same parameters order: storageId, logKind, version
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user