From a817715ad4f625e355b285d67ee323e8b2006ae4 Mon Sep 17 00:00:00 2001 From: Keuin Date: Mon, 25 Jan 2021 03:12:16 +0800 Subject: Code refactor --- .../operation/backup/method/ConfiguredIncrementalBackupMethod.java | 1 - .../operation/backup/method/ConfiguredPrimitiveBackupMethod.java | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main/java/com/keuin/kbackupfabric/operation/backup/method') diff --git a/src/main/java/com/keuin/kbackupfabric/operation/backup/method/ConfiguredIncrementalBackupMethod.java b/src/main/java/com/keuin/kbackupfabric/operation/backup/method/ConfiguredIncrementalBackupMethod.java index 5cd58aa..5fe532a 100644 --- a/src/main/java/com/keuin/kbackupfabric/operation/backup/method/ConfiguredIncrementalBackupMethod.java +++ b/src/main/java/com/keuin/kbackupfabric/operation/backup/method/ConfiguredIncrementalBackupMethod.java @@ -57,7 +57,6 @@ public class ConfiguredIncrementalBackupMethod implements ConfiguredBackupMethod try { // construct incremental backup index PrintUtil.info("Hashing files..."); - // TODO collection = new ObjectCollectionFactory<>(Sha256Identifier.getFactory(), hashFactoryThreads, 16) .fromDirectory(levelPathFile, new HashSet<>(Arrays.asList("session.lock", "kbackup_metadata"))); diff --git a/src/main/java/com/keuin/kbackupfabric/operation/backup/method/ConfiguredPrimitiveBackupMethod.java b/src/main/java/com/keuin/kbackupfabric/operation/backup/method/ConfiguredPrimitiveBackupMethod.java index 9f0632d..0047c44 100644 --- a/src/main/java/com/keuin/kbackupfabric/operation/backup/method/ConfiguredPrimitiveBackupMethod.java +++ b/src/main/java/com/keuin/kbackupfabric/operation/backup/method/ConfiguredPrimitiveBackupMethod.java @@ -42,7 +42,7 @@ public class ConfiguredPrimitiveBackupMethod implements ConfiguredBackupMethod { PrimitiveBackupFeedback feedback; try { - String customBackupName = new PrimitiveBackupFileNameEncoder().decode(backupFileName).customName; + String customBackupName = PrimitiveBackupFileNameEncoder.INSTANCE.decode(backupFileName).customName; BackupMetadata backupMetadata = new BackupMetadata(System.currentTimeMillis(), customBackupName); PrintUtil.info(String.format("zip(srcPath=%s, destPath=%s)", levelPath, backupSavePath)); PrintUtil.info("Compressing level ..."); -- cgit v1.2.3