X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Forg%2Fonap%2Fclamp%2Fclds%2Fclient%2Freq%2Ftca%2FTcaRequestFormatter.java;h=1478342c520b786d098d0788af265a8168689497;hb=df19466321c94e4ec2c4e5ca5c8bf462602f2538;hp=35c438d9e77e149a6fbd96def0d1a2421ff49995;hpb=4e68a4d91db14f6495c3a255bd422b50ff99c841;p=clamp.git 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());