diff options
author | JvD_Ericsson <jeff.van.dam@est.tech> | 2023-05-17 09:46:33 +0100 |
---|---|---|
committer | Vasyl Razinkov <vasyl.razinkov@est.tech> | 2023-05-26 11:22:02 +0000 |
commit | 342f9f85850667c9c3b8b31283421343b3a23caa (patch) | |
tree | 6129f4118ac77e1b246669f5c9b31069e526642a /catalog-model/src/main/java | |
parent | b0c11fcb95f4c4d1ba2a9be611ea1453b0d90e85 (diff) |
Fix invalid json being set on propertyConstraints
Issue-ID: SDC-4503
Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech>
Change-Id: Ic506ebb3f1358bb5e3f6b110c2df67bbb24fc901
Diffstat (limited to 'catalog-model/src/main/java')
-rw-r--r-- | catalog-model/src/main/java/org/openecomp/sdc/be/model/PropertyDefinition.java | 16 |
1 files changed, 6 insertions, 10 deletions
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<PropertyConstraint> 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<PropertyConstraint> getConstraints() { if (CollectionUtils.isEmpty(constraints)) { - constraints = deserializePropertyConstraints(findConstraints()); + setConstraints(deserializePropertyConstraints(findConstraints())); } return constraints; } |