Fix Blocker/Critical sonar issues 93/13693/2
authorshashikanth <shashikanth.vh@huawei.com>
Wed, 20 Sep 2017 06:06:54 +0000 (11:36 +0530)
committerShashikanth VH <shashikanth.vh@huawei.com>
Wed, 20 Sep 2017 06:08:53 +0000 (06:08 +0000)
Fix Blocker/Critical sonar issues in aai/sparky-be module
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: Ia057d51b93c806bfabdfe58d972fae1d47c86d7e
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
src/main/java/org/openecomp/sparky/synchronizer/AutosuggestionSynchronizer.java

index e028039..ae36240 100644 (file)
@@ -252,6 +252,7 @@ public class AutosuggestionSynchronizer extends AbstractEntitySynchronizer
         String message = "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");