Fix null check for groups 41/87341/4
authorsubhash kumar singh <subhash.kumar.singh@huawei.com>
Thu, 9 May 2019 09:50:48 +0000 (15:20 +0530)
committerSeshu Kumar M <seshu.kumar.m@huawei.com>
Fri, 17 May 2019 14:23:00 +0000 (14:23 +0000)
Fix null check for groups.

Change-Id: I2432707e4a6dc6bfe49d23eddc9318562c2c43b3
Issue-ID: SO-1393
Signed-off-by: subhash kumar singh <subhash.kumar.singh@huawei.com>
bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateResources.groovy

index fd698d4..c2f0c02 100644 (file)
@@ -134,7 +134,7 @@ public class DoCreateResources extends AbstractServiceTaskProcessor{
                         // then we would like to add it twice for processing
                         // e.g.  S{ V1{G1, G2, G1}} --> S{ V1{G1, G1, G2}}
                         if (resource instanceof VnfResource) {
-                            if (resource.getGroups() != null) {
+                            if (resource.getGroupOrder() != null && !StringUtils.isEmpty(resource.getGroupOrder())) {
                                 String[] grpSequence = resource.getGroupOrder().split(",")
                                 for (String grpType in grpSequence) {
                                     for (GroupResource gResource in resource.getGroups()) {