aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--aai-core/src/main/java/org/onap/aai/serialization/queryformats/Aggregate.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/aai-core/src/main/java/org/onap/aai/serialization/queryformats/Aggregate.java b/aai-core/src/main/java/org/onap/aai/serialization/queryformats/Aggregate.java
index b7627267..9ce343f6 100644
--- a/aai-core/src/main/java/org/onap/aai/serialization/queryformats/Aggregate.java
+++ b/aai-core/src/main/java/org/onap/aai/serialization/queryformats/Aggregate.java
@@ -129,7 +129,7 @@ public class Aggregate extends MultiFormatMapper {
json.addProperty(prop.key(), gson.toJson(prop.value()));
} else {
// throw exception?
- return null;
+ return Optional.empty();
}
}
} else {
@@ -214,7 +214,7 @@ public class Aggregate extends MultiFormatMapper {
json.add(inner);
} else {
Optional<JsonObject> obj = this.getJsonFromVertex((Vertex)l, properties);
- json.add(obj.get());
+ if(obj.isPresent()) json.add(obj.get());
}
}
return Optional.of(json);