From bf430888dbb1c514d10e5cc3fd25496712a86730 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Thu, 17 Jun 2021 16:29:33 -0400 Subject: Use lombok for errors pap, pdp, sim-dmaap, sim-pdp Issue-ID: POLICY-3396 Change-Id: Ib2c9bc5dc199e15ae9ca077031c0f2cfbc5b6a81 Signed-off-by: Jim Hahn --- .../onap/policy/models/sim/dmaap/startstop/Main.java | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'models-sim/models-sim-dmaap/src/main/java') diff --git a/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/Main.java b/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/Main.java index e136509c9..9c368e044 100644 --- a/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/Main.java +++ b/models-sim/models-sim-dmaap/src/main/java/org/onap/policy/models/sim/dmaap/startstop/Main.java @@ -22,6 +22,7 @@ package org.onap.policy.models.sim.dmaap.startstop; import java.util.Arrays; +import lombok.Getter; import org.onap.policy.common.utils.cmd.CommandLineException; import org.onap.policy.models.sim.dmaap.DmaapSimException; import org.onap.policy.models.sim.dmaap.DmaapSimRuntimeException; @@ -38,7 +39,8 @@ public class Main { private static final Logger LOGGER = LoggerFactory.getLogger(Main.class); private DmaapSimActivator activator; - private DmaapSimParameterGroup parameterGroup; + @Getter + private DmaapSimParameterGroup parameters; /** * Instantiates the DMaap Simulator service. @@ -67,14 +69,14 @@ public class Main { // Read the parameters try { - parameterGroup = new DmaapSimParameterHandler().getParameters(arguments); + parameters = new DmaapSimParameterHandler().getParameters(arguments); } catch (final Exception e) { LOGGER.error("start of DMaaP simulator service failed", e); return; } // Now, create the activator for the DMaaP Simulator service - activator = new DmaapSimActivator(parameterGroup); + activator = new DmaapSimActivator(parameters); // Start the activator try { @@ -89,15 +91,6 @@ public class Main { LOGGER.info("Started DMaaP simulator service"); } - /** - * Get the parameters specified in JSON. - * - * @return the parameters - */ - public DmaapSimParameterGroup getParameters() { - return parameterGroup; - } - /** * Shut down Execution. * @@ -105,7 +98,7 @@ public class Main { */ public void shutdown() throws DmaapSimException { // clear the parameterGroup variable - parameterGroup = null; + parameters = null; // clear the DMaaP simulator activator if (activator != null && activator.isAlive()) { -- cgit 1.2.3-korg