[SDC] OnBoarding rebase. 37/5837/2
authorAvi Ziv <avi.ziv@amdocs.com>
Sun, 16 Jul 2017 12:21:15 +0000 (15:21 +0300)
committerMichael Lando <ml636r@att.com>
Sun, 16 Jul 2017 16:07:36 +0000 (19:07 +0300)
Change-Id: I07d496057b8057e953c97c99a19fae9e406b7e35
Signed-off-by: Avi Ziv <avi.ziv@amdocs.com>
Signed-off-by: Michael Lando <ml636r@att.com>
openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/EntitlementPoolZusammenDaoImpl.java
openecomp-be/lib/openecomp-sdc-vendor-license-lib/openecomp-sdc-vendor-license-core/src/main/java/org/openecomp/sdc/vendorlicense/dao/impl/zusammen/LicenseKeyGroupZusammenDaoImpl.java
pom.xml

index ffaf780..a31210a 100644 (file)
@@ -83,7 +83,9 @@ public class EntitlementPoolZusammenDaoImpl implements EntitlementPoolDao {
       if (entitlmentpoolElement.getRelations() == null) {
         entitlmentpoolElement.setRelations(new ArrayList<>());
       }
-    entitlmentpoolElement.getRelations().addAll(epFromDb.get().getRelations());
+      if (epFromDb.get().getRelations() != null) {
+        entitlmentpoolElement.getRelations().addAll(epFromDb.get().getRelations());
+      }
     }
 
     zusammenAdaptor.saveElement(context,elementContext, entitlmentpoolElement,
index 03537a2..f5d905c 100644 (file)
@@ -74,14 +74,15 @@ public class LicenseKeyGroupZusammenDaoImpl implements LicenseKeyGroupDao {
     Optional<ElementInfo> lkgFromDb = zusammenAdaptor.getElementInfo(context, elementContext,
         new Id(licenseKeyGroup.getId()));
 
-    if(lkgFromDb.isPresent()) {
+    if (lkgFromDb.isPresent()) {
 
-      iflicenseKeyGroupElement.getRelations() == null) {
+      if (licenseKeyGroupElement.getRelations() == null) {
         licenseKeyGroupElement.setRelations(new ArrayList<>());
       }
 
-      lkgFromDb.get().getRelations().forEach(relation ->
-          licenseKeyGroupElement.getRelations().add(relation));
+      if (lkgFromDb.get().getRelations() != null) {
+        licenseKeyGroupElement.getRelations().addAll(lkgFromDb.get().getRelations());
+      }
     }
 
     zusammenAdaptor.saveElement(context, elementContext,
diff --git a/pom.xml b/pom.xml
index 235da5d..b1dfc96 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -30,7 +30,7 @@
 
                <artifact-generator-api.version>1.1.0-SNAPSHOT</artifact-generator-api.version>
                <artifact-generator-core.version>1.1.0-SNAPSHOT</artifact-generator-core.version>
-               <ecomp.version>1.1.0-SNAPSHOT</ecomp.version>
+               <ecomp.version>1.1.0</ecomp.version>
                <dox-common-lib.version>1.1.0-SNAPSHOT</dox-common-lib.version>
 
                <!-- Elastic Search mapper (reference the elastic search version actually). -->