From d191116808e4a90035c7e8b2acea0fefa439d13c Mon Sep 17 00:00:00 2001 From: liamfallon Date: Sun, 23 Sep 2018 14:37:49 +0100 Subject: Fix more sonar issues These are the last few easy to fix issues. Most remaining issues are to do with code coverage. Othersare due tot he way script interpreters work and will have to be exempted. Issue-ID: POLICY-1034 Change-Id: Ie1d1def43d33ef78a13d7f9b43ae4e22ef00cb5b Signed-off-by: liamfallon --- .../policy/apex/core/deployment/BatchDeployer.java | 60 +++++++++++----------- 1 file changed, 30 insertions(+), 30 deletions(-) (limited to 'core') diff --git a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java index b275c72ab..321d61583 100644 --- a/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java +++ b/core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java @@ -47,36 +47,6 @@ public class BatchDeployer { // The facade that is handling messaging to the engine service private EngineServiceFacade engineServiceFacade = null; - /** - * The main method, reads the Apex server host address, port and location of the Apex model file from the command - * line arguments. - * - * @param args the arguments that specify the Apex engine and the Apex model file - */ - public static void main(final String[] args) { - if (args.length != NUM_ARGUMENTS) { - String message = "invalid arguments: " + Arrays.toString(args) - + "usage: Deployer "; - LOGGER.error(message); - return; - } - - BatchDeployer deployer = null; - try { - // Use a Deployer object to handle model deployment - deployer = new BatchDeployer(args[0], Integer.parseInt(args[1])); - deployer.init(); - deployer.deployModel(args[2], false, false); - deployer.startEngines(); - } catch (final ApexException | IOException e) { - LOGGER.error("model deployment failed on parameters {}", args, e); - } finally { - if (deployer != null) { - deployer.close(); - } - } - } - /** * Instantiates a new deployer. * @@ -152,4 +122,34 @@ public class BatchDeployer { engineServiceFacade.stopEngine(engineKey); } } + + /** + * The main method, reads the Apex server host address, port and location of the Apex model file from the command + * line arguments. + * + * @param args the arguments that specify the Apex engine and the Apex model file + */ + public static void main(final String[] args) { + if (args.length != NUM_ARGUMENTS) { + String message = "invalid arguments: " + Arrays.toString(args) + + "usage: Deployer "; + LOGGER.error(message); + return; + } + + BatchDeployer deployer = null; + try { + // Use a Deployer object to handle model deployment + deployer = new BatchDeployer(args[0], Integer.parseInt(args[1])); + deployer.init(); + deployer.deployModel(args[2], false, false); + deployer.startEngines(); + } catch (final ApexException | IOException e) { + LOGGER.error("model deployment failed on parameters {}", args, e); + } finally { + if (deployer != null) { + deployer.close(); + } + } + } } -- cgit 1.2.3-korg