From 5dc6e700cbcbc01833a02a193f660a286b934898 Mon Sep 17 00:00:00 2001 From: Keuin Date: Fri, 13 Jan 2023 02:49:57 +0800 Subject: Code cleanup. --- src/main/java/com/keuin/kbackupfabric/operation/BackupOperation.java | 2 +- .../kbackupfabric/operation/abstracts/AbstractAsyncOperation.java | 2 +- .../kbackupfabric/operation/abstracts/AbstractSerialOperation.java | 2 +- .../operation/backup/method/ConfiguredIncrementalBackupMethod.java | 3 +-- 4 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src/main/java/com/keuin/kbackupfabric/operation') diff --git a/src/main/java/com/keuin/kbackupfabric/operation/BackupOperation.java b/src/main/java/com/keuin/kbackupfabric/operation/BackupOperation.java index 1798fb7..3fec8b9 100644 --- a/src/main/java/com/keuin/kbackupfabric/operation/BackupOperation.java +++ b/src/main/java/com/keuin/kbackupfabric/operation/BackupOperation.java @@ -33,7 +33,7 @@ public class BackupOperation extends InvokableAsyncBlockingOperation { protected void async() { String backupSaveDirectory = ""; MinecraftServer server = context.getSource().getMinecraftServer(); - boolean success = false; // only success when everything is done + boolean success; // only success when everything is done try { //// Do our main backup logic diff --git a/src/main/java/com/keuin/kbackupfabric/operation/abstracts/AbstractAsyncOperation.java b/src/main/java/com/keuin/kbackupfabric/operation/abstracts/AbstractAsyncOperation.java index bb0c704..2dac710 100644 --- a/src/main/java/com/keuin/kbackupfabric/operation/abstracts/AbstractAsyncOperation.java +++ b/src/main/java/com/keuin/kbackupfabric/operation/abstracts/AbstractAsyncOperation.java @@ -2,7 +2,7 @@ package com.keuin.kbackupfabric.operation.abstracts; /** * A basic async operation, but not invokable. - * If you want a invokable interface (InvokableOperation), use InvokableAsyncOperation instead. + * If you want an invokable interface (InvokableOperation), use InvokableAsyncOperation instead. */ public abstract class AbstractAsyncOperation extends AbstractSerialOperation { diff --git a/src/main/java/com/keuin/kbackupfabric/operation/abstracts/AbstractSerialOperation.java b/src/main/java/com/keuin/kbackupfabric/operation/abstracts/AbstractSerialOperation.java index 92dfb53..db5433f 100644 --- a/src/main/java/com/keuin/kbackupfabric/operation/abstracts/AbstractSerialOperation.java +++ b/src/main/java/com/keuin/kbackupfabric/operation/abstracts/AbstractSerialOperation.java @@ -2,7 +2,7 @@ package com.keuin.kbackupfabric.operation.abstracts; /** * The most basic operation abstraction. - * This class represents an serial operation, which is limited in a non-public method. + * This class represents a serial operation, which is limited in a non-public method. * Note that the operation is not invokable by default, you should use InvokableOperation in order to provide a public method for users to call. */ public abstract class AbstractSerialOperation { 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 2cc0765..cfc9b81 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 @@ -99,7 +99,6 @@ public class ConfiguredIncrementalBackupMethod implements ConfiguredBackupMethod PrintUtil.info("Incremental backup finished."); feedback = new IncrementalBackupFeedback(true, copyResult); } catch (IOException e) { -// e.printStackTrace(); // stack trace has been passed to backup feedback. No need to print here. feedback = new IncrementalBackupFeedback(e); } @@ -119,7 +118,7 @@ public class ConfiguredIncrementalBackupMethod implements ConfiguredBackupMethod // remove unused object files in the base if (collection != null) { try { - // collection may have been copied (partially) to the base, but we may not need them + // collection may have been copied (partially) to the base, but we may not need them, // so we perform a clean here // perform a clean-up Iterable backups = ObjectCollectionSerializer.fromDirectory(new File(backupIndexFileSaveDirectory)); -- cgit v1.2.3