aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@ericsson.com>2018-09-23 14:37:49 +0100
committerliamfallon <liam.fallon@ericsson.com>2018-09-23 14:38:00 +0100
commitd191116808e4a90035c7e8b2acea0fefa439d13c (patch)
tree8ceb2112ff221089a76ff951f71a6d594e0d973e /core
parent6973ec9109fd2651e2284663b6c8039bd830a677 (diff)
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 <liam.fallon@ericsson.com>
Diffstat (limited to 'core')
-rw-r--r--core/core-deployment/src/main/java/org/onap/policy/apex/core/deployment/BatchDeployer.java60
1 files changed, 30 insertions, 30 deletions
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
@@ -48,36 +48,6 @@ public class BatchDeployer {
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 <server address> <port address> <Apex Model file location>";
- 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.
*
* @param hostName the host name of the host running the Apex Engine
@@ -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 <server address> <port address> <Apex Model file location>";
+ 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();
+ }
+ }
+ }
}