summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-05-18 15:52:02 +0200
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-05-18 15:52:02 +0200
commitdf19466321c94e4ec2c4e5ca5c8bf462602f2538 (patch)
tree5bee4eaa46cb5bcb10a4fe56706f003ac682f54e /src/main/java
parent4e68a4d91db14f6495c3a255bd422b50ff99c841 (diff)
Fix duplicate thresholds
Fix issue detected when publishing multiple thresholds in the TCA UI Issue-ID: CLAMP-165 Change-Id: I748f145c275a9e084effee451379e8c0615201d2 Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'src/main/java')
-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 35c438d9..1478342c 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());