aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/api
diff options
context:
space:
mode:
authortalig <talig@amdocs.com>2018-04-23 18:47:18 +0300
committerAvi Gaffa <avi.gaffa@amdocs.com>2018-04-24 05:28:13 +0000
commit41f385fc32fcb50d211c4cf4685fc4da2ff894c9 (patch)
treebfa5be08b19bcb9fdf1c127e5f488d36a1e7142b /openecomp-be/api
parent5668d53e5261594b53f50dc750a7e9841cb27bf1 (diff)
Fix 2 healing bugs
1. Prevent NullPointerException in healing manager. 2. When submitting healed vsp version - sync vlm only if vsp includes vlm version. Change-Id: I3b7088b15f51a5ffe12e277567677a83fc141763 Issue-ID: SDC-1234 Signed-off-by: talig <talig@amdocs.com>
Diffstat (limited to 'openecomp-be/api')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
index bb7e847ddf..16ef8c5761 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/src/main/java/org/openecomp/sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java
@@ -247,8 +247,10 @@ public class VendorSoftwareProductsImpl implements VendorSoftwareProducts {
private void submitHealedVersion(VspDetails vspDetails, String baseVersionId, String user) {
try {
- // sync vlm if not exists on user space
- versioningManager.get(vspDetails.getVendorId(), vspDetails.getVlmVersion());
+ if (vspDetails.getVlmVersion() != null) {
+ // sync vlm if not exists on user space
+ versioningManager.get(vspDetails.getVendorId(), vspDetails.getVlmVersion());
+ }
Optional<ValidationResponse> validationResponse =
submit(vspDetails.getId(), vspDetails.getVersion(), "Submit healed Vsp", user);