From a48252db26e2ccd031ddb2046d87737d47c248a6 Mon Sep 17 00:00:00 2001 From: Sirisha_Manchikanti Date: Tue, 2 Nov 2021 05:35:12 +0000 Subject: Remove code smells in controlloop runtime Remove code-smells reported by sonar cloud https://sonarcloud.io/project/issues?id=onap_policy-clamp&resolved=false Issue-ID: POLICY-3540 Signed-off-by: Sirisha_Manchikanti Change-Id: I8ed1c4599e7eeebbc3a31e74cea4148eb0435847 --- .../clamp/controlloop/models/controlloop/concepts/ControlLoop.java | 2 +- .../models/messages/rest/instantiation/ControlLoopPrimedResponse.java | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'models/src/main/java') diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoop.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoop.java index 4d3d37236..cf22b7228 100644 --- a/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoop.java +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/controlloop/concepts/ControlLoop.java @@ -107,7 +107,7 @@ public class ControlLoop extends ToscaEntity implements Comparable */ public List getControlLoopElementStatisticsList(final ControlLoop controlLoop) { if (MapUtils.isEmpty(controlLoop.elements)) { - return null; + return List.of(); } return controlLoop.elements.values().stream().map(ControlLoopElement::getClElementStatistics) diff --git a/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/rest/instantiation/ControlLoopPrimedResponse.java b/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/rest/instantiation/ControlLoopPrimedResponse.java index 993c6e592..4d2dfaf01 100644 --- a/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/rest/instantiation/ControlLoopPrimedResponse.java +++ b/models/src/main/java/org/onap/policy/clamp/controlloop/models/messages/rest/instantiation/ControlLoopPrimedResponse.java @@ -24,8 +24,6 @@ import java.util.List; import lombok.Getter; import lombok.Setter; import lombok.ToString; -import org.onap.policy.clamp.controlloop.models.controlloop.concepts.ControlLoopOrderedState; -import org.onap.policy.clamp.controlloop.models.messages.rest.GenericNameVersion; import org.onap.policy.clamp.controlloop.models.messages.rest.SimpleResponse; -- cgit 1.2.3-korg