From 342f9f85850667c9c3b8b31283421343b3a23caa Mon Sep 17 00:00:00 2001 From: JvD_Ericsson Date: Wed, 17 May 2023 09:46:33 +0100 Subject: Fix invalid json being set on propertyConstraints Issue-ID: SDC-4503 Signed-off-by: JvD_Ericsson Change-Id: Ic506ebb3f1358bb5e3f6b110c2df67bbb24fc901 --- .../org/openecomp/sdc/be/model/PropertyDefinition.java | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'catalog-model/src') diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/PropertyDefinition.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/PropertyDefinition.java index 5d78d37364..6f54d72bee 100644 --- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/PropertyDefinition.java +++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/PropertyDefinition.java @@ -17,6 +17,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.openecomp.sdc.be.model; import static org.openecomp.sdc.be.dao.utils.CollectionUtils.safeGetList; @@ -27,7 +28,9 @@ import com.google.gson.GsonBuilder; import java.lang.reflect.Type; import java.util.List; import java.util.stream.Collectors; +import lombok.Getter; import lombok.NoArgsConstructor; +import lombok.Setter; import org.apache.commons.collections.CollectionUtils; import org.openecomp.sdc.be.datatypes.elements.PropertyDataDefinition; import org.openecomp.sdc.be.model.operations.impl.PropertyOperation; @@ -36,15 +39,8 @@ import org.openecomp.sdc.be.model.operations.impl.PropertyOperation; public class PropertyDefinition extends PropertyDataDefinition implements IOperationParameter, IComplexDefaultValue, ToscaPropertyData { private List constraints; - - public String getToscaSubPath() { - return toscaSubPath; - } - - public void setToscaSubPath(String toscaSubPath) { - this.toscaSubPath = toscaSubPath; - } - + @Getter + @Setter private String toscaSubPath; public PropertyDefinition(PropertyDataDefinition p) { @@ -62,7 +58,7 @@ public class PropertyDefinition extends PropertyDataDefinition implements IOpera public List getConstraints() { if (CollectionUtils.isEmpty(constraints)) { - constraints = deserializePropertyConstraints(findConstraints()); + setConstraints(deserializePropertyConstraints(findConstraints())); } return constraints; } -- cgit 1.2.3-korg