diff options
author | 2018-09-27 14:29:21 +0100 | |
---|---|---|
committer | 2018-09-27 14:29:31 +0100 | |
commit | 2b21188b82e21eb87c4e79a6f31beff9325ab2ea (patch) | |
tree | 4bdb78a8709ddf1956ec1b862deabbe478b1a90d /tools/tools-common/src/main | |
parent | 3db2feb37ac427a09790fef1ba637c16c3187ed6 (diff) |
Add unit test for Apex command line tools
THere was no unit test for the command line tools. This
review adds unit test and also fixes a few small bugs that
showed up when uit test was run.
Issue-ID: POLICY-1034
Change-Id: Ic19aacdb168fb5a6faa0cd83ed22ccfcedaa51f5
Signed-off-by: liamfallon <liam.fallon@ericsson.com>
Diffstat (limited to 'tools/tools-common/src/main')
-rw-r--r-- | tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/CliParser.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/CliParser.java b/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/CliParser.java index 31692dc21..dfaafbd25 100644 --- a/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/CliParser.java +++ b/tools/tools-common/src/main/java/org/onap/policy/apex/tools/common/CliParser.java @@ -34,7 +34,6 @@ import org.apache.commons.cli.CommandLineParser; import org.apache.commons.cli.DefaultParser; import org.apache.commons.cli.Option; import org.apache.commons.cli.Options; -import org.apache.commons.cli.ParseException; /** * Application CLI parser. @@ -80,7 +79,7 @@ public class CliParser { final CommandLineParser parser = new DefaultParser(); try { cmd = parser.parse(options, args); - } catch (final ParseException ex) { + } catch (final Exception ex) { Console.CONSOLE.error("Parsing failed, see reason and cause below"); Console.CONSOLE.stacktrace(ex); } |