aboutsummaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorEddy Hautot <eh552t@intl.att.com>2018-05-18 14:05:45 +0000
committerGerrit Code Review <gerrit@onap.org>2018-05-18 14:05:45 +0000
commit1b71aad66f71e7f46d84268afbd589315363991d (patch)
tree151e2d77c42aa371fe670de1a3fbced4e661b467 /src/main
parent0742bc095be9c554e3c43f7a0928aa4ea78091c0 (diff)
parentdf19466321c94e4ec2c4e5ca5c8bf462602f2538 (diff)
Merge "Fix duplicate thresholds"
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.java3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.java b/src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.java
index 35c438d9e..1478342c5 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/tca/TcaRequestFormatter.java
@@ -157,10 +157,9 @@ public class TcaRequestFormatter {
private static void addThresholds(ClampProperties refProp, String service, ObjectNode appendToNode, TcaItem tcaItem,
ModelProperties modelProperties) {
ArrayNode tcaNodes = appendToNode.withArray("thresholds");
- ObjectNode tcaNode;
try {
- tcaNode = (ObjectNode) refProp.getJsonTemplate("tca.thresholds.template", service);
for (TcaThreshold tcaThreshold : tcaItem.getTcaThresholds()) {
+ ObjectNode tcaNode = (ObjectNode) refProp.getJsonTemplate("tca.thresholds.template", service);
tcaNode.put("closedLoopControlName", modelProperties.getControlNameAndPolicyUniqueId());
tcaNode.put("fieldPath", tcaThreshold.getFieldPath());
tcaNode.put("thresholdValue", tcaThreshold.getThreshold());