{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/664","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/664/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/664/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/664/events","html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/issues/664","id":136199070,"number":664,"title":"Return an empty collection instead of null.","user":{"login":"aozarov","id":8921691,"avatar_url":"https://avatars.githubusercontent.com/u/8921691?v=3","gravatar_id":"","url":"https://api.github.com/users/aozarov","html_url":"https://github.com/aozarov","followers_url":"https://api.github.com/users/aozarov/followers","following_url":"https://api.github.com/users/aozarov/following{/other_user}","gists_url":"https://api.github.com/users/aozarov/gists{/gist_id}","starred_url":"https://api.github.com/users/aozarov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aozarov/subscriptions","organizations_url":"https://api.github.com/users/aozarov/orgs","repos_url":"https://api.github.com/users/aozarov/repos","events_url":"https://api.github.com/users/aozarov/events{/privacy}","received_events_url":"https://api.github.com/users/aozarov/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-24T21:58:47Z","updated_at":"2016-02-24T22:04:31Z","closed_at":null,"body":"Some of the the resource metadata properties are collections/maps.\r\n\r\nI think currently we are not consistent and in some cases we return `null` if there is no value (e.g.\r\n`BlobInfo` and `BucketInfo`) and in some cases we return an empty collection (e.g. `ProjectInfo`).\r\n\r\nMy preference would be to never return `null` for a collection as I think the value of being able to\r\ndistinct the case of \"unassigned\" and \"assigned and empty\" is very small and does not justify\r\nthe cost for checking for `null` *and* empty.\r\n\r\nIn any case, I think we should be consistent.\r\n\r\n/cc @mziccard @ajkannan @mderka "},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/comments/188472488","html_url":"https://github.com/GoogleCloudPlatform/gcloud-java/issues/664#issuecomment-188472488","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/gcloud-java/issues/664","id":188472488,"user":{"login":"ajkannan","id":5316886,"avatar_url":"https://avatars.githubusercontent.com/u/5316886?v=3","gravatar_id":"","url":"https://api.github.com/users/ajkannan","html_url":"https://github.com/ajkannan","followers_url":"https://api.github.com/users/ajkannan/followers","following_url":"https://api.github.com/users/ajkannan/following{/other_user}","gists_url":"https://api.github.com/users/ajkannan/gists{/gist_id}","starred_url":"https://api.github.com/users/ajkannan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajkannan/subscriptions","organizations_url":"https://api.github.com/users/ajkannan/orgs","repos_url":"https://api.github.com/users/ajkannan/repos","events_url":"https://api.github.com/users/ajkannan/events{/privacy}","received_events_url":"https://api.github.com/users/ajkannan/received_events","type":"User","site_admin":false},"created_at":"2016-02-24T22:04:30Z","updated_at":"2016-02-24T22:04:30Z","body":"+1 to never returning null.  Even when users say \"get\" or \"list\" and leave out metatdata properties using field options, I think it's reasonable to have empty collections instead of null collections."}}