diff options
author | Michael Lando <ml636r@att.com> | 2017-06-11 14:22:02 +0300 |
---|---|---|
committer | Michael Lando <ml636r@att.com> | 2017-06-11 17:48:32 +0300 |
commit | b3d4898d9e8452ea0b8d848c048e712d43b8d9a3 (patch) | |
tree | 0609319203be13f6c29ccbe24cb39c9d64f90095 /openecomp-be/lib/openecomp-sdc-vendor-license-lib | |
parent | af9929df75604ce407d0ca542b200630164e0ae6 (diff) |
[SDC-29] rebase continue work to align source
Change-Id: I218f1c5ee23fb2c8314f1c70921d3ad8682c10f4
Signed-off-by: Michael Lando <ml636r@att.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-sdc-vendor-license-lib')
2 files changed, 19 insertions, 5 deletions
diff --git a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/FeatureGroupDaoZusammenImpl.java b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/FeatureGroupDaoZusammenImpl.java index ee6ffbfca2..624ffeb05e 100644 --- a/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/FeatureGroupDaoZusammenImpl.java +++ b/openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/FeatureGroupDaoZusammenImpl.java @@ -176,8 +176,12 @@ public class FeatureGroupDaoZusammenImpl implements FeatureGroupDao { mapElementInfoToFeatureGroup(featureGroup.getId(), featureGroup.getVersion(), elementInfo.get()); - currentFeatureGroup.getEntitlementPoolIds().removeAll(removedEntitlementPools); - currentFeatureGroup.getEntitlementPoolIds().addAll(addedEntitlementPools); + if (!(removedEntitlementPools == null)) { + currentFeatureGroup.getEntitlementPoolIds().removeAll(removedEntitlementPools); + } + if (!(addedEntitlementPools == null)) { + currentFeatureGroup.getEntitlementPoolIds().addAll(addedEntitlementPools); + } if (featureGroupElement.getRelations() == null) { featureGroupElement.setRelations(new ArrayList<>()); } @@ -187,7 +191,12 @@ public class FeatureGroupDaoZusammenImpl implements FeatureGroupDao { .createRelation(RelationType.FeatureGroupToEntitlmentPool, relation)) .collect(Collectors.toList())); - currentFeatureGroup.getLicenseKeyGroupIds().removeAll(removedLicenseKeyGroups); + if (!(removedLicenseKeyGroups == null)) { + currentFeatureGroup.getLicenseKeyGroupIds().removeAll(removedLicenseKeyGroups); + } + if (!(addedLicenseKeyGroups == null)) { + currentFeatureGroup.getLicenseKeyGroupIds().addAll(addedLicenseKeyGroups); + } currentFeatureGroup.getLicenseKeyGroupIds().addAll(addedLicenseKeyGroups); featureGroupElement.getRelations() .addAll(currentFeatureGroup.getLicenseKeyGroupIds().stream() diff --git a/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 b/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 55bbae9b33..45c831fbd7 100644 --- a/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 +++ b/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 @@ -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)) |