GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Compute v1: NPE in iterateAll() · Issue #3736 · googleapis/google-cloud-java

Compute v1: NPE in iterateAll() #3736

New issue
Copy link
New issue
Copy link
Closed
Closed
Compute v1: NPE in iterateAll()#3736
Copy link
Assignees
andreamlin
Labels
api: computeIssues related to the Compute Engine 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.

Description

@yonran
yonran
opened on Sep 26, 2018
Issue body actions

Using "com.google.cloud" % "google-cloud-compute" % "0.63.0-alpha", com.google.api.gax.paging.AbstractPagedListResponse.iterateAll().iterator() throws NullPointerException when there are no results:

Using scala console:

import com.google.cloud.compute.v1._
import com.google.cloud.ServiceOptions

val zone = ProjectZoneName.of(ServiceOptions.getDefaultProjectId(), "us-west1-a")
val instanceClient: InstanceClient = InstanceClient.create()
val diskClient: DiskClient = DiskClient.create()

instanceClient.listInstances(ListInstancesHttpRequest.newBuilder()
  .setZone(zone.toString())
  .setFilter("labels.app=nonexistant")
  .build()
).iterateAll().iterator()

diskClient.listDisks(ListDisksHttpRequest.newBuilder()
  .setZone(zone.toString())
  .setFilter(s"labels.app=nonexistant status=READY")
  .build()
).iterateAll().iterator()

throws

java.lang.NullPointerException
  at com.google.api.gax.paging.AbstractPage$AllResourcesIterator.<init>(AbstractPage.java:168)
  at com.google.api.gax.paging.AbstractPage$AllResourcesIterator.<init>(AbstractPage.java:162)
  at com.google.api.gax.paging.AbstractPage$2.iterator(AbstractPage.java:136)
  ... 47 elided

Possibly related to #2973

Activity

  1. JustinBeckwith
    added
    triage meI really want to be triaged.
    on Sep 27, 2018
  2. yihanzhen
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: computeIssues related to the Compute Engine API.
    priority: p2Moderately-important priority. Fix may not be included in next release.
    and removed
    triage meI really want to be triaged.
    on Sep 27, 2018
  3. yihanzhen
    assigned
    andreamlin
    on Sep 27, 2018
  4. andreamlin
    added a commit that references this issue on Nov 14, 2018

    fix nullpointer issue (#2410)

    9ad9ebf
  5. ajaaym commented on Dec 7, 2018

    @ajaaym
    ajaaym
    on Dec 7, 2018
    Contributor
    More actions

    This is fixed.

  6. ajaaym
    closed this as completedon Dec 7, 2018
  7. suztomo
    added a commit that references this issue on Mar 9, 2026

    fix: Add labels to converter for listTables method (#3735) (#3736)

    8634822
  8. lqiu96
    added a commit that references this issue on Mar 20, 2026

    fix: Add labels to converter for listTables method (#3735) (#3736)

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

Metadata

Metadata

Assignees

  • @andreamlin
    andreamlin

Labels

api: computeIssues related to the Compute Engine 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

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.