mneethiraj commented on a change in pull request #29: ATLAS-2933:Empty array
attributes are returned as null instead of an empty list
URL: https://github.com/apache/atlas/pull/29#discussion_r264532942
##########
File path:
repository/src/main/java/org/apache/atlas/repository/store/graph/v2/EntityGraphRetriever.java
##########
@@ -725,6 +725,10 @@ private Object mapVertexToAttribute(AtlasVertex
entityVertex, AtlasAttribute att
List<AtlasObjectId> ret = null;
List softRefVal =
entityVertex.getListProperty(attribute.getVertexPropertyName(), List.class);
+ if (CollectionUtils.isEmpty(softRefVal)) {
+ return softRefVal;
+ }
+
if (CollectionUtils.isNotEmpty(softRefVal)) {
Review comment:
replace line #732 with: "else {", as the reverse condition is already tested
in line #728 above.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services