Skip to content

Return an empty collection instead of null. #664

Description

@aozarov

Some of the the resource metadata properties are collections/maps.

I think currently we are not consistent and in some cases we return null if there is no value (e.g.
BlobInfo and BucketInfo) and in some cases we return an empty collection (e.g. ProjectInfo).

My preference would be to never return null for a collection as I think the value of being able to
distinct the case of "unassigned" and "assigned and empty" is very small and does not justify
the cost for checking for null and empty.

In any case, I think we should be consistent.

/cc @mziccard @ajkannan @mderka

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions