summaryrefslogtreecommitdiffstats
path: root/catalog-model/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'catalog-model/src/main')
-rw-r--r--catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupTypeOperation.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupTypeOperation.java b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupTypeOperation.java
index a6538dcea1..ebaaf81cd8 100644
--- a/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupTypeOperation.java
+++ b/catalog-model/src/main/java/org/openecomp/sdc/be/model/operations/impl/GroupTypeOperation.java
@@ -232,10 +232,12 @@ public class GroupTypeOperation implements IGroupTypeOperation {
* @param oldCapabilities
* @return
*/
- private Map<String, CapabilityDefinition> collectNewCapabilities(Map<String, CapabilityDefinition> updatedGroupTypeCapabilities, Map<String, CapabilityDefinition> oldCapabilities) {
- return updatedGroupTypeCapabilities != null? updatedGroupTypeCapabilities.entrySet().stream()
- .filter(entry -> !oldCapabilities.containsKey(entry.getKey()))
- .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue) ): null;
+ private Map<String, CapabilityDefinition> collectNewCapabilities(
+ Map<String, CapabilityDefinition> updatedGroupTypeCapabilities,
+ Map<String, CapabilityDefinition> oldCapabilities) {
+ return updatedGroupTypeCapabilities != null ? updatedGroupTypeCapabilities.entrySet().stream()
+ .filter(entry -> !oldCapabilities.containsKey(entry.getKey()))
+ .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)) : new HashMap<>();
}
private JanusGraphOperationStatus createCapabilities(GroupTypeData groupTypeData, Map<String, CapabilityDefinition> groupCapabilities) {