summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBogumil Zebek <bogumil.zebek@nokia.com>2018-08-06 10:20:21 +0200
committerbogumil_zebek <bogumil.zebek@nokia.com>2018-08-06 10:20:21 +0200
commitb64430578b31413590df6cc882e1726ffa29b87c (patch)
treee4205651c281af63bb1be29169081d86554b3fbc
parentd6ce3ee2d92d313f9790e3035ddf728b1cc303cc (diff)
Fix potential null pointer
Change-Id: I0577f9d32a733f390ebbaebf36297eca257b10dd Issue-ID: AAI-342 Signed-off-by: bogumil_zebek <bogumil.zebek@nokia.com>
-rw-r--r--sparkybe-onap-service/src/main/java/org/onap/aai/sparky/viewandinspect/services/BaseVisualizationService.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/viewandinspect/services/BaseVisualizationService.java b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/viewandinspect/services/BaseVisualizationService.java
index 33819e2..a81ab9c 100644
--- a/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/viewandinspect/services/BaseVisualizationService.java
+++ b/sparkybe-onap-service/src/main/java/org/onap/aai/sparky/viewandinspect/services/BaseVisualizationService.java
@@ -193,7 +193,7 @@ public class BaseVisualizationService implements VisualizationService {
public OperationResult buildVisualizationUsingGenericQuery(QueryRequest queryRequest) {
OperationResult returnValue = new OperationResult();
- OperationResult dataCollectionResult = new OperationResult();
+ OperationResult dataCollectionResult;
QueryParams queryParams = null;
SearchableEntity sourceEntity = null;
@@ -220,7 +220,7 @@ public class BaseVisualizationService implements VisualizationService {
dataCollectionResult = new OperationResult(500, "Failed to get nodes-query result from AAI");
}
- if (dataCollectionResult.getResultCode() == 200) {
+ if (dataCollectionResult == null || dataCollectionResult.getResultCode() == 200) {
String d3OutputJsonOutput = null;