refactor: remove unused constructor

This commit is contained in:
ineanto 2023-12-23 00:06:30 +01:00
parent b394c7ef0c
commit 95b4f4cdef
2 changed files with 2 additions and 8 deletions

View file

@ -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");

View file

@ -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");
}