refactor: remove unused constructor
This commit is contained in:
parent
b394c7ef0c
commit
95b4f4cdef
2 changed files with 2 additions and 8 deletions
|
@ -17,12 +17,6 @@ public class CustomLocale {
|
||||||
private final Version versionObject;
|
private final Version versionObject;
|
||||||
private final YamlConfig yamlFile;
|
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 {
|
public CustomLocale() throws IOException {
|
||||||
this.yamlFile = new YamlConfig(new FileInputStream(file));
|
this.yamlFile = new YamlConfig(new FileInputStream(file));
|
||||||
this.version = yamlFile.getString("version");
|
this.version = yamlFile.getString("version");
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class MigrationTest {
|
||||||
outputStream.flush();
|
outputStream.flush();
|
||||||
|
|
||||||
// Get wrong locale
|
// Get wrong locale
|
||||||
final CustomLocale customLocaleBeforeMigration = new CustomLocale(new FileInputStream(localeFile));
|
final CustomLocale customLocaleBeforeMigration = new CustomLocale();
|
||||||
assertEquals(customLocaleBeforeMigration.getVersion(), "1.0.0");
|
assertEquals(customLocaleBeforeMigration.getVersion(), "1.0.0");
|
||||||
|
|
||||||
// Migrate the wrong locale to the correct one
|
// Migrate the wrong locale to the correct one
|
||||||
|
@ -58,7 +58,7 @@ public class MigrationTest {
|
||||||
localeMigrator.migrate();
|
localeMigrator.migrate();
|
||||||
|
|
||||||
// Get the migrated locale
|
// Get the migrated locale
|
||||||
final CustomLocale customLocaleMigrated = new CustomLocale(new FileInputStream(localeFile));
|
final CustomLocale customLocaleMigrated = new CustomLocale();
|
||||||
assertEquals(customLocaleMigrated.getVersion(), "1.1.0");
|
assertEquals(customLocaleMigrated.getVersion(), "1.1.0");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue