From: Chris André Date: Wed, 22 Apr 2020 00:28:38 +0000 (-0400) Subject: Add null test to test in `UpgradeBusinessLogic` X-Git-Tag: 1.7.0~213 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=c78692e297c0127474d2af000f22316638991c1e;p=sdc.git Add null test to test in `UpgradeBusinessLogic` Issue-ID: SDC-2915 Signed-off-by: Chris Andre Change-Id: I4e6f27b707b1bdbbecf9a97606c9a655d834fe56 --- diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogic.java index c388611824..dbe5141fe0 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogic.java @@ -276,10 +276,10 @@ public class UpgradeBusinessLogic { } return result; } finally { - if ( result.isRight() ){ + if ( result != null && result.isRight() ){ // undo checkout resource in case of failure LOGGER.debug("Failed to update Allotted resource {} {}, Error {}. UNDOCHEKOUT our resource", resource.getName(), resource.getUniqueId(), result.right().value()); - + upgradeStatus.addServiceStatus(request.getServiceId(), ActionStatus.GENERAL_ERROR); } }