Fix Blocker sonar issues in sparky-be module 89/13689/1
authorshashikanth <shashikanth.vh@huawei.com>
Wed, 20 Sep 2017 06:02:09 +0000 (11:32 +0530)
committershashikanth <shashikanth.vh@huawei.com>
Wed, 20 Sep 2017 06:03:36 +0000 (11:33 +0530)
Fix Blocker/Critical sonar issues
https://sonar.onap.org/component_issues?id=org.openecomp.aai.sparky-be%3Asparky-be#resolved=false|severities=BLOCKER

Fixed NullPointerException might be thrown as 'rootNode' is nullable here

Issue-Id:AAI-342
Change-Id: I32f86eefa224dfd92954581a20e5180f6482910a
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
src/main/java/org/openecomp/sparky/synchronizer/AggregationSynchronizer.java

index 2d7429c..2fd67c3 100644 (file)
@@ -632,6 +632,7 @@ public class AggregationSynchronizer extends AbstractEntitySynchronizer
             "Could not deserialize JSON (representing operation result) as node tree. " +
             "Operation result = " + jsonResult + ". " + exc.getLocalizedMessage();
         LOG.error(AaiUiMsgs.JSON_PROCESSING_ERROR, message);
+        return;
       }
 
       JsonNode resultData = rootNode.get("result-data");