From 95b4f4cdefe29d4827800ad275f6590e057db4cf Mon Sep 17 00:00:00 2001 From: ineanto Date: Sat, 23 Dec 2023 00:06:30 +0100 Subject: [PATCH] refactor: remove unused constructor --- src/main/java/xyz/ineanto/nicko/i18n/CustomLocale.java | 6 ------ .../xyz/ineanto/nicko/test/migration/MigrationTest.java | 4 ++-- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/xyz/ineanto/nicko/i18n/CustomLocale.java b/src/main/java/xyz/ineanto/nicko/i18n/CustomLocale.java index b1e429e..5007070 100644 --- a/src/main/java/xyz/ineanto/nicko/i18n/CustomLocale.java +++ b/src/main/java/xyz/ineanto/nicko/i18n/CustomLocale.java @@ -17,12 +17,6 @@ public class CustomLocale { private final Version versionObject; private final YamlConfig yamlFile; - public CustomLocale(InputStream input) throws IOException { - this.yamlFile = new YamlConfig(input); - this.version = yamlFile.getString("version"); - this.versionObject = Version.fromString(version); - } - public CustomLocale() throws IOException { this.yamlFile = new YamlConfig(new FileInputStream(file)); this.version = yamlFile.getString("version"); diff --git a/src/test/java/xyz/ineanto/nicko/test/migration/MigrationTest.java b/src/test/java/xyz/ineanto/nicko/test/migration/MigrationTest.java index 61ba6b3..cdc12b0 100644 --- a/src/test/java/xyz/ineanto/nicko/test/migration/MigrationTest.java +++ b/src/test/java/xyz/ineanto/nicko/test/migration/MigrationTest.java @@ -50,7 +50,7 @@ public class MigrationTest { outputStream.flush(); // Get wrong locale - final CustomLocale customLocaleBeforeMigration = new CustomLocale(new FileInputStream(localeFile)); + final CustomLocale customLocaleBeforeMigration = new CustomLocale(); assertEquals(customLocaleBeforeMigration.getVersion(), "1.0.0"); // Migrate the wrong locale to the correct one @@ -58,7 +58,7 @@ public class MigrationTest { localeMigrator.migrate(); // Get the migrated locale - final CustomLocale customLocaleMigrated = new CustomLocale(new FileInputStream(localeFile)); + final CustomLocale customLocaleMigrated = new CustomLocale(); assertEquals(customLocaleMigrated.getVersion(), "1.1.0"); }