Checkstyle fix

This commit is contained in:
Jindra Petřík
2025-05-18 17:57:04 +02:00
parent e81ca03450
commit 72dec4d522
3 changed files with 10 additions and 8 deletions

View File

@@ -1462,7 +1462,7 @@ public final class Configuration {
Object value = null;
if (config.containsKey(name)) {
value = config.get(name);
Class<?> type = ConfigurationItem.getConfigurationFieldType(field);
if (value != null && !type.isAssignableFrom(value.getClass())) {
System.out.println("Configuration item has a wrong type: " + name + " expected: " + type.getSimpleName() + " actual: " + value.getClass().getSimpleName());
@@ -1496,8 +1496,9 @@ public final class Configuration {
}
/**
* Loads configuration from specific file. If it has .bin extension,
* it uses legacy storage, else it uses TOML storage.
* Loads configuration from specific file. If it has .bin extension, it uses
* legacy storage, else it uses TOML storage.
*
* @param file File to load from
*/
public static void loadFromFile(String file) {

View File

@@ -241,8 +241,9 @@ public class TomlConfigurationStorage implements ConfigurationStorage {
@Override
public void saveToFile(String file) {
saveToFile(file, null, null);
saveToFile(file, null, null);
}
public void saveToFile(String file, Boolean showComments, Boolean modifiedOnly) {
if (new File(file).exists() && (showComments == null || modifiedOnly == null)) {
TomlParseResult tomlResult;