diff options
Diffstat (limited to 'tools/model-generator/src')
3 files changed, 7 insertions, 19 deletions
diff --git a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Application.java b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Application.java index 70436150c..34ab414d7 100644 --- a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Application.java +++ b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Application.java @@ -24,12 +24,9 @@ import java.io.PrintStream; import org.apache.commons.cli.CommandLine; import org.apache.commons.cli.HelpFormatter; -import org.onap.policy.apex.model.basicmodel.concepts.ApexException; import org.onap.policy.apex.tools.common.CliOptions; import org.onap.policy.apex.tools.common.CliParser; import org.onap.policy.apex.tools.common.OutputFile; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; /** * Process an Apex Policy Model file to generate the CLI commands to generate an equivalent Apex Policy Model. @@ -37,9 +34,6 @@ import org.slf4j.LoggerFactory; * @author Sven van der Meer <sven.van.der.meer@ericsson.com> */ public final class Application { - // Get a reference to the logger - private static final Logger LOGGER = LoggerFactory.getLogger(Application.class); - /** The name of the application. */ public static final String APP_NAME = "gen-model2cli"; @@ -125,13 +119,7 @@ public final class Application { OUT_STREAM.println(); } - try { - final Model2Cli app = new Model2Cli(modelFile, outfile, !cmd.hasOption("sv"), APP_NAME); - app.runApp(); - } catch (final ApexException aex) { - String message = APP_NAME + ": caught APEX exception with message: " + aex.getMessage(); - ERR_STREAM.println(message); - LOGGER.warn(message, aex); - } + final Model2Cli app = new Model2Cli(modelFile, outfile, !cmd.hasOption("sv"), APP_NAME); + app.runApp(); } } diff --git a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2Cli.java b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2Cli.java index f58faf0eb..01434190b 100644 --- a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2Cli.java +++ b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2Cli.java @@ -108,7 +108,7 @@ public class Model2Cli { * version), negative integer for errors * @throws ApexException if any problem occurred in the model */ - public int runApp() throws ApexException { + public int runApp() { final CodeGeneratorCliEditor codeGen = new CodeGeneratorCliEditor(); final ApexModelFactory factory = new ApexModelFactory(); diff --git a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2event/Application.java b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2event/Application.java index a5600ead1..c7fc5e115 100644 --- a/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2event/Application.java +++ b/tools/model-generator/src/main/java/org/onap/policy/apex/tools/model/generator/model2event/Application.java @@ -45,14 +45,14 @@ public final class Application { /** The description 1-liner of the application. */ public static final String APP_DESCRIPTION = "generates JSON templates for events generated from a policy model"; - /** Private constructor to prevent instantiation. */ - private Application() { - } - // Input and output streams private static final PrintStream OUT_STREAM = System.out; private static final PrintStream ERR_STREAM = System.err; + /** Private constructor to prevent instantiation. */ + private Application() { + } + /** * Main method to start the application. * |