show warning on invalid boolean config

This commit is contained in:
honfika@gmail.com
2015-09-06 20:34:25 +02:00
parent 6f49fc2b18
commit 65786d364a

View File

@@ -723,10 +723,14 @@ public class CommandLineArgumentParser {
String value = cp[1];
for (ConfigurationItem<Boolean> item : commandlineConfigBoolean) {
if (key.toLowerCase().equals(item.getName().toLowerCase())) {
Boolean bValue = parseBooleanConfigValue(value);
if (bValue != null) {
System.out.println("Config " + item.getName() + " set to " + bValue);
item.set(bValue);
if (value != null) {
Boolean bValue = parseBooleanConfigValue(value);
if (bValue != null) {
System.out.println("Config " + item.getName() + " set to " + bValue);
item.set(bValue);
} else {
System.out.println("Invalid config value for " + item.getName() + ": " + value);
}
}
}
}
@@ -1462,6 +1466,8 @@ public class CommandLineArgumentParser {
System.exit(1);
}
Statistics.print(stat);
long stopTime = System.currentTimeMillis();
long time = stopTime - startTime;
System.out.println("Export finished. Total export time: " + Helper.formatTimeSec(time));