Sitelet https://github.com/googleapis/google-cloud-java/issues/1511
Skip to content

setMaxResults doesn't seem to work for Cloud Storage API #1511

Description

@johanhaleby

I'm using:

<dependency>
            <groupId>com.google.cloud</groupId>
            <artifactId>gcloud-java</artifactId>
            <version>0.2.8</version>
</dependency>

which transitively depends on com.google.apis:google-api-services-storage:v1-rev62-1.21.0 and I have the following code:

Storage storage = ...
storage.objects().list(bucket).setMaxResults((long) Integer.MAX_VALUE).execute().getItems();

However the number of items are still 1000 (which is the default value) regardless of the value I pass to setMaxResults:

System.out.println(storage.objects().list(bucket).setMaxResults((long) Integer.MAX_VALUE).execute().size());

This yields 1000 as result.

No activity

Activity on this issue will appear here.

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.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions