Not possible to set max occurrences to zero 67/123867/2
authorMichaelMorris <michael.morris@est.tech>
Thu, 2 Sep 2021 11:19:07 +0000 (12:19 +0100)
committerAndr� Schmid <andre.schmid@est.tech>
Mon, 6 Sep 2021 14:00:47 +0000 (14:00 +0000)
Signed-off-by: MichaelMorris <michael.morris@est.tech>
Issue-ID: SDC-3711
Change-Id: I512abaca1defade0bee259b330eca2fea322eaf7

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

index 4f65230..1503835 100644 (file)
@@ -844,7 +844,7 @@ public class ResourceImportManager {
                 log.debug("Invalid occurrenses format.  Max occurrence is {}", maxObj);
                 throw new ByActionStatusComponentException(ActionStatus.INVALID_OCCURRENCES);
             }
-            if (maxOccurrences <= 0 || maxOccurrences < minOccurrences) {
+            if (maxOccurrences < 0 || maxOccurrences < minOccurrences) {
                 log.debug("Invalid occurrenses format.  min occurrence is {}, Max occurrence is {}", minOccurrences, maxOccurrences);
                 throw new ByActionStatusComponentException(ActionStatus.INVALID_OCCURRENCES);
             }