You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@atlas.apache.org by GitBox <gi...@apache.org> on 2019/03/26 18:44:55 UTC
[GitHub] [atlas] sarathkumarsubramanian commented on a change in pull
request #37: ATLAS-2933:Empty array attributes are returned as null instead
of an empty list
sarathkumarsubramanian commented on a change in pull request #37: ATLAS-2933:Empty array attributes are returned as null instead of an empty list
URL: https://github.com/apache/atlas/pull/37#discussion_r269252614
##########
File path: graphdb/janus/src/main/java/org/apache/atlas/repository/graphdb/janus/AtlasJanusElement.java
##########
@@ -200,8 +204,8 @@ public String getIdForDisplay() {
List<String> value = getListProperty(propertyName);
- if (value.isEmpty()) {
- return (List<V>)value;
+ if (value == null || value.isEmpty()) {
+ return value == null ? null : new ArrayList<>();
Review comment:
null check again here is not needed.
if (CollectionUtils.isEmpty(value)) {
return value;
}
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services