aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-model/src
diff options
context:
space:
mode:
authorvasraz <vasyl.razinkov@est.tech>2023-07-14 15:32:42 +0100
committerVasyl Razinkov <vasyl.razinkov@est.tech>2023-07-14 15:35:46 +0000
commit531f22dd3eebf6581d923f4d794ffcd4f5d8dbe2 (patch)
tree0ad0851af276e87fa12b4f830d89519011e3a885 /catalog-model/src
parent97d78828e86277c27a6cd4d66c97e367dfc64538 (diff)
Fix 'Import service with JUEL-function produces wrong UI representation'
Signed-off-by: Vasyl Razinkov <vasyl.razinkov@est.tech> Change-Id: Icc37f2892fa5630df04d32e8496a57fc25ad7ad2 Issue-ID: SDC-4573
Diffstat (limited to 'catalog-model/src')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java3
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java
index 67d9755808..eb25b30e89 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupInstanceOperation.java
@@ -29,6 +29,7 @@ import java.util.UUID;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import org.apache.commons.collections.MapUtils;
+import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.janusgraph.core.JanusGraph;
@@ -405,7 +406,7 @@ public class GroupInstanceOperation extends AbstractOperation implements IGroupI
final GroupInstanceData groupInstanceData = findResInstanceRes.left().value();
//TODO fix
toscaFunctionValidator.validate(propDataDef, null);
- propertyValueData.setValue(propDataDef.getToscaFunction().getValue());
+ propertyValueData.setValue(StringEscapeUtils.unescapeJava(propDataDef.getToscaFunction().getValue()));
} else {
final String innerType = innerTypeEither.left().value();
Either<Object, Boolean> isValid = propertyOperation
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java
index dbe11a8efd..b2c2fec33f 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java
@@ -59,6 +59,7 @@ import java.util.regex.Pattern;
import java.util.stream.Collectors;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.collections.MapUtils;
+import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.ImmutablePair;
import org.apache.tinkerpop.gremlin.structure.Edge;
@@ -1740,7 +1741,7 @@ public class PropertyOperation extends AbstractOperation implements IPropertyOpe
final Map<String, DataTypeDefinition> dataTypes) {
if (property.isToscaFunction()) {
toscaFunctionValidator.validate(property, containerComponent);
- property.setValue(property.getToscaFunction().getValue());
+ property.setValue(StringEscapeUtils.unescapeJava(property.getToscaFunction().getValue()));
return Either.left(property.getValue());
}
Either<String, JanusGraphOperationStatus> checkInnerType = checkInnerType(property);