From 41f385fc32fcb50d211c4cf4685fc4da2ff894c9 Mon Sep 17 00:00:00 2001 From: talig Date: Mon, 23 Apr 2018 18:47:18 +0300 Subject: 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 --- .../sdcrests/vsp/rest/services/VendorSoftwareProductsImpl.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'openecomp-be/api') 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 = submit(vspDetails.getId(), vspDetails.getVersion(), "Submit healed Vsp", user); -- cgit 1.2.3-korg