Fix Blocker/Critical sonar issues 35/13735/1
authorshashikanth <shashikanth.vh@huawei.com>
Wed, 20 Sep 2017 07:24:45 +0000 (12:54 +0530)
committershashikanth <shashikanth.vh@huawei.com>
Wed, 20 Sep 2017 07:24:46 +0000 (12:54 +0530)
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: I052becbe3e04ca266c039df63464a2dd90dc772c
Signed-off-by: shashikanth.vh <shashikanth.vh@huawei.com>
src/main/java/org/openecomp/sparky/synchronizer/GeoSynchronizer.java

index c8d3b95..493f3c9 100644 (file)
@@ -250,6 +250,7 @@ public class GeoSynchronizer extends AbstractEntitySynchronizer implements Index
         rootNode = mapper.readTree(jsonResult);
       } catch (IOException exc) {
         LOG.error(AaiUiMsgs.ERROR_GENERIC, exc);
+        return;
       }
 
       JsonNode resultData = rootNode.get("result-data");