From 78de7cfde5847f003f6ded666a2338350753217a Mon Sep 17 00:00:00 2001 From: Oleksandr Moliavko Date: Tue, 25 Jun 2019 17:02:53 +0300 Subject: Moved code inside IF checking for null ptr to prevent crash Issue-ID: SO-1841 Signed-off-by: Oleksandr Moliavko Change-Id: Ie759b98828f39fba00ccdb7edcd7fc28e83ea50e --- .../java/org/onap/so/client/appc/ApplicationControllerAction.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bpmn/MSOCommonBPMN/src/main') diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java index b97b9ac1ca..9828d11186 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/client/appc/ApplicationControllerAction.java @@ -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); -- cgit 1.2.3-korg