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:
[email protected]


With regards,
Apache Git Services

Reply via email to