JUEL function value not displayed properly in UI 61/135361/3
authorimamSidero <imam.hussain@est.tech>
Tue, 11 Jul 2023 11:53:42 +0000 (12:53 +0100)
committerVasyl Razinkov <vasyl.razinkov@est.tech>
Wed, 12 Jul 2023 15:58:23 +0000 (15:58 +0000)
Bug fix for the expression values to escape the special characters

Issue-ID: SDC-4564
Signed-off-by: Imam hussain <imam.hussain@est.tech>
Change-Id: I829d2d1e9a244aba2f87f37280ff0a43f445c9a2

catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ComponentInstanceBusinessLogic.java

index c6007a3..ec7fe0c 100644 (file)
@@ -42,6 +42,7 @@ import java.util.UUID;
 import java.util.stream.Collectors;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.MapUtils;
+import org.apache.commons.text.StringEscapeUtils;
 import org.apache.commons.lang3.StringUtils;
 import org.apache.commons.lang3.tuple.ImmutablePair;
 import org.json.JSONArray;
@@ -1983,7 +1984,7 @@ public class ComponentInstanceBusinessLogic extends BaseBusinessLogic {
                 String propertyParentUniqueId = property.getParentUniqueId();
                 if (property.isToscaFunction()) {
                     toscaFunctionValidator.validate(property, containerComponent);
-                    property.setValue(property.getToscaFunction().getValue());
+                    property.setValue(StringEscapeUtils.unescapeJava(property.getToscaFunction().getValue()));
                 }
                 if (CollectionUtils.isNotEmpty(property.getSubPropertyToscaFunctions())) {
                     ToscaPropertyType type = ToscaPropertyType.isValidType(property.getType());