From a817715ad4f625e355b285d67ee323e8b2006ae4 Mon Sep 17 00:00:00 2001 From: Keuin Date: Mon, 25 Jan 2021 03:12:16 +0800 Subject: Code refactor --- .../kbackupfabric/backup/name/PrimitiveBackupFileNameEncoder.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main/java/com/keuin/kbackupfabric/backup/name') diff --git a/src/main/java/com/keuin/kbackupfabric/backup/name/PrimitiveBackupFileNameEncoder.java b/src/main/java/com/keuin/kbackupfabric/backup/name/PrimitiveBackupFileNameEncoder.java index 1deec8f..9e3a97e 100644 --- a/src/main/java/com/keuin/kbackupfabric/backup/name/PrimitiveBackupFileNameEncoder.java +++ b/src/main/java/com/keuin/kbackupfabric/backup/name/PrimitiveBackupFileNameEncoder.java @@ -9,6 +9,11 @@ import java.util.regex.Pattern; public class PrimitiveBackupFileNameEncoder implements BackupFileNameEncoder { private static final String backupFileNamePrefix = "kbackup"; + public static final PrimitiveBackupFileNameEncoder INSTANCE = new PrimitiveBackupFileNameEncoder(); + + private PrimitiveBackupFileNameEncoder() { + } + @Override public String encode(String customName, LocalDateTime time) { if (!isValidCustomName(customName)) -- cgit v1.2.3