-
Notifications
You must be signed in to change notification settings - Fork 134
Closed
Labels
api: bigqueryIssues related to the googleapis/java-bigquery API.Issues related to the googleapis/java-bigquery API.
Description
BigQueryImpl.testIamPermissions will throw a NullPointerException if the caller does not have any of the permissions being checked.
If none of the permissions being checked are granted, BigQuery returns an empty json object, {}.
This causes TestIamPermissionsResponse.permissions to be set to null.
On this line, BigQueryImpl calls ImmutableList.copyOf(response.getPermissions()).
This causes copyOf to throw a NullPointerException, and produces this stack trace.
java.lang.NullPointerException
at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:259)
at com.google.cloud.bigquery.BigQueryImpl.testIamPermissions(BigQueryImpl.java:1496)
at com.spotify.ml.featureregistry.validation.iam.BigQueryIamTester.lambda$credentialsHavePermission$0(BigQueryIamTester.java:39)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run$$$capture(CompletableFuture.java:1700)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1692)
at java.base/java.util.concurrent.ForkJoinTask.doExec$$$capture(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/java-bigquery API.Issues related to the googleapis/java-bigquery API.