Add null test to test in `UpgradeBusinessLogic` 92/106392/2
authorChris André <chris.andre@yoppworks.com>
Wed, 22 Apr 2020 00:28:38 +0000 (20:28 -0400)
committerOfir Sonsino <ofir.sonsino@intl.att.com>
Wed, 22 Apr 2020 10:56:44 +0000 (10:56 +0000)
Issue-ID: SDC-2915
Signed-off-by: Chris Andre <chris.andre@yoppworks.com>
Change-Id: I4e6f27b707b1bdbbecf9a97606c9a655d834fe56

catalog-be/src/main/java/org/openecomp/sdc/be/components/upgrade/UpgradeBusinessLogic.java

index c388611..dbe5141 100644 (file)
@@ -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);
             }
         }