From 65786d364a1c81bb93db75a522a3d4dd28074e14 Mon Sep 17 00:00:00 2001 From: "honfika@gmail.com" Date: Sun, 6 Sep 2015 20:34:25 +0200 Subject: [PATCH] show warning on invalid boolean config --- .../flash/console/CommandLineArgumentParser.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java b/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java index d50eef6f1..58c43da38 100644 --- a/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java +++ b/src/com/jpexs/decompiler/flash/console/CommandLineArgumentParser.java @@ -723,10 +723,14 @@ public class CommandLineArgumentParser { String value = cp[1]; for (ConfigurationItem 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));