Skip to content

Commit

Permalink
Refactoring: migration factory -> repository
Browse files Browse the repository at this point in the history
  • Loading branch information
voidpointer0x00 committed Apr 16, 2023
1 parent 21dd836 commit 38be624
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.bukkit.plugin.java.JavaPlugin;
import voidpointer.spigot.framework.localemodule.LocaleLog;
import voidpointer.spigot.framework.localemodule.annotation.AutowiredLocale;
import voidpointer.spigot.voidwhitelist.config.migration.WhitelistConfigMigrationFactory;
import voidpointer.spigot.voidwhitelist.config.migration.WhitelistConfigMigrationRepository;
import voidpointer.spigot.voidwhitelist.date.Duration;
import voidpointer.spigot.voidwhitelist.storage.StorageMethod;

Expand Down Expand Up @@ -54,7 +54,7 @@ public WhitelistConfig(final @NonNull JavaPlugin plugin) {
* and runs an appropriate migration for them.
*/
public void runMigrations() {
WhitelistConfigMigrationFactory.getAllMigrations().forEach(migration -> {
WhitelistConfigMigrationRepository.getAllMigrations().forEach(migration -> {
if (!migration.isUpToDate(plugin.getConfig())) {
/* this method is called at plugin load stage, in which LocaleLog is not
* initialized yet, so we have report any information this way. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import java.util.LinkedList;
import java.util.Queue;

public final class WhitelistConfigMigrationFactory {
public final class WhitelistConfigMigrationRepository {
public static Collection<ConfigMigration> getAllMigrations() {
/* migrations will only run once when the server is loading,
* so we don't need to save or cache migrations anywhere,
Expand Down

0 comments on commit 38be624

Please sign in to comment.