Skip to content

google-cloud-storage README example is incorrect #2301

Description

@ifigotin

We have the following example:
Iterator<Bucket> bucketIterator = storage.list().iterateAll();

However, storage.list().iterateAll() does not return java.util.Iterator, instead
java.lang.Iterable is returned.

Consider changing the example to a 'for' loop, e.g.:

      Storage storage = StorageOptions.getDefaultInstance().getService();
      for(Bucket bucket : storage.list().iterateAll()) {
        ...
      }

Activity

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

Metadata

Metadata

Assignees

Labels

api: storageIssues related to the Cloud Storage API.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions