Fix setting input values destroys constraints 78/133178/2
authorMichaelMorris <michael.morris@est.tech>
Tue, 7 Feb 2023 17:20:47 +0000 (17:20 +0000)
committerVasyl Razinkov <vasyl.razinkov@est.tech>
Tue, 7 Feb 2023 22:13:41 +0000 (22:13 +0000)
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Issue-ID: SDC-4374
Change-Id: I7cfb377cc8008ab042a38824a4aad3d1b74723c0

catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/PropertyOperation.java

index fa6df00..0b8d2c8 100644 (file)
@@ -2178,7 +2178,6 @@ public class PropertyOperation extends AbstractOperation implements IPropertyOpe
                 if (constraintType == null) {
                     log.warn("ConstraintType was not found for constraint name:{}", key);
                 } else {
-                    if (set.size() == 1 || (set.size() == 2 && ConstraintType.PATTERN == constraintType)) {
                         final JsonElement value = element.getValue();
                         final Object typedValue = getTypedValue(value);
                         switch (constraintType) {
@@ -2297,7 +2296,6 @@ public class PropertyOperation extends AbstractOperation implements IPropertyOpe
                             default:
                                 log.warn("Key {} is not supported. Ignored.", key);
                         }
-                    }
                 }
             }
             return propertyConstraint;