Moved code inside IF checking for null ptr to prevent crash 56/90456/1
authorOleksandr Moliavko <o.moliavko@samsung.com>
Tue, 25 Jun 2019 14:02:53 +0000 (17:02 +0300)
committerOleksandr Moliavko <o.moliavko@samsung.com>
Tue, 25 Jun 2019 14:12:31 +0000 (17:12 +0300)
Issue-ID: SO-1841
Signed-off-by: Oleksandr Moliavko <o.moliavko@samsung.com>
Change-Id: Ie759b98828f39fba00ccdb7edcd7fc28e83ea50e

bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java

index b97b9ac..9828d11 100644 (file)
@@ -113,9 +113,9 @@ public class ApplicationControllerAction {
                 errorCode = Integer.toString(appCStatus.getCode());
                 errorMessage = appCStatus.getMessage();
 
-            }
-            if (ApplicationControllerSupport.getCategoryOf(appCStatus).equals(StatusCategory.NORMAL)) {
-                errorCode = "0";
+                if (ApplicationControllerSupport.getCategoryOf(appCStatus).equals(StatusCategory.NORMAL)) {
+                    errorCode = "0";
+                }
             }
         } catch (JsonProcessingException e) {
             logger.error("Incorrect Payload format for action request: {}", action.toString(), e);