aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common
diff options
context:
space:
mode:
authormarcinrzepeckiwroc <marcin.rzepecki@nokia.com>2020-12-11 14:52:17 +0100
committerIkram Ikramullah <ikram@research.att.com>2020-12-21 20:55:11 +0000
commit57e87a09d2e457ab30df304eaa96988c6ea1c78b (patch)
tree214d2078569a07c3c0420d1503d71607220d59d3 /vid-app-common
parentf3821edf3122600c99658c5e6c11234199f04173 (diff)
Fix for VID-928: NullPointerException during deploy service instance with empty cds model fields.
Flag "Skip post instantiation configuration" is not collected. Issue-ID: VID-928 Signed-off-by: marcinrzepeckiwroc <marcin.rzepecki@nokia.com> Change-Id: I3cabaf1b503160a6352fd89f511b3e6d7b706064
Diffstat (limited to 'vid-app-common')
-rw-r--r--vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt5
1 files changed, 3 insertions, 2 deletions
diff --git a/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt b/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt
index b69f76dfe..6146fec39 100644
--- a/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt
+++ b/vid-app-common/src/main/java/org/onap/vid/job/command/MsoRequestBuilder.kt
@@ -250,9 +250,10 @@ class MsoRequestBuilder
}
}
- val result: MutableMap<String, String> = instanceParams[0].entries.stream()
+ val result: MutableMap<String, String> = mutableMapOf();
+ instanceParams[0].entries.stream()
.filter { entry -> !keysToRemove.contains(entry.key) }
- .collect(Collectors.toMap({ it.key }, { it.value }))
+ .forEach { t -> result.put(t.key, t.value) }
return if (result.isEmpty()) emptyList() else listOf(result)
}