diff options
author | Sirisha_Manchikanti <sirisha.manchikanti@est.tech> | 2021-11-02 05:35:12 +0000 |
---|---|---|
committer | Sirisha_Manchikanti <sirisha.manchikanti@est.tech> | 2021-11-02 06:05:15 +0000 |
commit | a48252db26e2ccd031ddb2046d87737d47c248a6 (patch) | |
tree | 69c6a7e25f1a5b67d0c1d598949d0b6ad815f41a /models/src/main/java | |
parent | 9a49920ac001f76d796cbffce823abd7c0c7d9e2 (diff) |
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 <sirisha.manchikanti@est.tech>
Change-Id: I8ed1c4599e7eeebbc3a31e74cea4148eb0435847
Diffstat (limited to 'models/src/main/java')
2 files changed, 1 insertions, 3 deletions
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<ControlLoop> */ public List<ClElementStatistics> 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; |