[SDC-29] rebase continue work to align source
[sdc.git] / openecomp-be / lib / openecomp-sdc-vendor-license-lib / openecomp-sdc-vendor-license-core / src / main / java / org / openecomp / sdc / vendorlicense / dao / impl / zusammen / LicenseAgreementDaoZusammenImpl.java
index 55bbae9..45c831f 100644 (file)
@@ -187,8 +187,13 @@ public class LicenseAgreementDaoZusammenImpl implements LicenseAgreementDao {
           mapElementInfoToLicenseAgreement(licenseAgreement.getId(), licenseAgreement.getVersion(),
               elementInfo.get());
 
-      currentLicenseAgreement.getFeatureGroupIds().removeAll(removedFeatureGroupIds);
-      currentLicenseAgreement.getFeatureGroupIds().addAll(addedFeatureGroupIds);
+      if (! (removedFeatureGroupIds == null) ) {
+        currentLicenseAgreement.getFeatureGroupIds().removeAll(removedFeatureGroupIds);
+      }
+
+      if (! (addedFeatureGroupIds == null)) {
+        currentLicenseAgreement.getFeatureGroupIds().addAll(addedFeatureGroupIds);
+      }
       licenseAgreementElement.setRelations(currentLicenseAgreement.getFeatureGroupIds().stream()
           .map(relation -> VlmZusammenUtil
               .createRelation(RelationType.LicenseAgreementToFeatureGroup, relation))