summaryrefslogtreecommitdiffstats
path: root/sparkybe-onap-service/src
diff options
context:
space:
mode:
authorJames Forsyth <jf2512@att.com>2018-08-22 18:47:05 +0000
committerGerrit Code Review <gerrit@onap.org>2018-08-22 18:47:05 +0000
commitae47212b8e5b25a1a125a6a55e210912520683e7 (patch)
tree0d42537acdb1cd18e914ebaeef496725c595be53 /sparkybe-onap-service/src
parent6530692958399a5b180c69b40714cce97aea68c9 (diff)
parentb64430578b31413590df6cc882e1726ffa29b87c (diff)
Merge "Fix potential null pointer"
Diffstat (limited to 'sparkybe-onap-service/src')
-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 afb0363..69acc42 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;