Merge "Error logging in SO-SDC adapter - in case of service distribution without...
authorLukasz Muszkieta <lukasz.muszkieta@nokia.com>
Mon, 7 Sep 2020 08:14:44 +0000 (08:14 +0000)
committerGerrit Code Review <gerrit@onap.org>
Mon, 7 Sep 2020 08:14:44 +0000 (08:14 +0000)
asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java

index ad96e1b..61c0cdb 100644 (file)
@@ -754,6 +754,12 @@ public class ASDCController {
             }
             // process NsstResource
             this.processNsstNotification(iNotif, toscaResourceStructure);
+
+            if (iNotif.getResources().isEmpty()) {
+                logger.error("Service Model contains no resources.");
+                return;
+            }
+
             for (IResourceInstance resource : iNotif.getResources()) {
 
                 String resourceType = resource.getResourceType();