getValues should not return null values

This commit is contained in:
Ben Bosman
2019-01-29 16:22:26 +01:00
parent e99252c16f
commit 855b3f9556

View File

@@ -137,7 +137,7 @@ public class Related implements VirtualBean {
* @param item The item that will be used to find the related item through its relationships
* @return The String value of the metadata fields concatened with a seperator as defined
* in the deepest Concatened bean in the chain
* Will return null if no relationships are found
* Will return an empty list if no relationships are found
* @throws SQLException If something goes wrong
*/
public List<String> getValues(Context context, Item item) throws SQLException {
@@ -172,7 +172,8 @@ public class Related implements VirtualBean {
}
}
return null;
//Return an empty list if no relationships were found
return new LinkedList<>();
}
}