summaryrefslogtreecommitdiffstats
path: root/models-pap/src
diff options
context:
space:
mode:
authorwaynedunican <wayne.dunican@est.tech>2024-07-23 09:23:51 +0100
committerwaynedunican <wayne.dunican@est.tech>2024-08-13 08:49:10 +0100
commitb7804abcf865dc58a01bed3f2be4756e731d9288 (patch)
tree7f6fc3b50622578bb8612de9fe5e5c6adddfaf28 /models-pap/src
parenta029ccab07f2dd71286804da620c513da9fdfc0e (diff)
Improve code coverage and sonar fixes
Increased code coverage to 90% SONAR - Removed TODO comments SONAR - Added NOSONAR where appropriate SONAR - Replaced stream.Collect() with stream.toList() where applicable SONAR - Made variables serializable or transient to comply with sonar rules Issue-ID: POLICY-5069 Change-Id: Ife256eaf4e6f427fe40b138bacc6f112dc5bcea4 Signed-off-by: waynedunican <wayne.dunican@est.tech>
Diffstat (limited to 'models-pap/src')
-rw-r--r--models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpDeployPolicies.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpDeployPolicies.java b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpDeployPolicies.java
index 6ab41ddf8..583c371e3 100644
--- a/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpDeployPolicies.java
+++ b/models-pap/src/main/java/org/onap/policy/models/pap/concepts/PdpDeployPolicies.java
@@ -3,7 +3,7 @@
* ONAP Policy Models
* ================================================================================
* Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2021 Nordix Foundation.
+ * Modifications Copyright (C) 2021, 2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,7 +22,6 @@
package org.onap.policy.models.pap.concepts;
import java.util.List;
-import java.util.stream.Collectors;
import lombok.ToString;
import org.onap.policy.models.tosca.authorative.concepts.ToscaConceptIdentifierOptVersion;
@@ -41,7 +40,7 @@ public class PdpDeployPolicies {
*/
public List<ToscaConceptIdentifierOptVersion> getPolicies() {
return policies == null ? null
- : policies.stream().map(PapPolicyIdentifier::getGenericIdentifier).collect(Collectors.toList());
+ : policies.stream().map(PapPolicyIdentifier::getGenericIdentifier).toList();
}
/**
@@ -51,6 +50,6 @@ public class PdpDeployPolicies {
*/
public void setPolicies(final List<ToscaConceptIdentifierOptVersion> policies) {
this.policies =
- policies == null ? null : policies.stream().map(PapPolicyIdentifier::new).collect(Collectors.toList());
+ policies == null ? null : policies.stream().map(PapPolicyIdentifier::new).toList();
}
}