-
Notifications
You must be signed in to change notification settings - Fork 130
Closed
Labels
api: bigqueryIssues related to the googleapis/java-bigquery API.Issues related to the googleapis/java-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-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.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Hello! We're getting a NPE resulting from ConnectionImpl:dryRun here:
java-bigquery/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/ConnectionImpl.java
Lines 173 to 176 in 3895bd9
| List<QueryParameter> queryParametersPb = | |
| dryRunJob.getStatistics().getQuery().getUndeclaredQueryParameters(); | |
| List<Parameter> queryParameters = | |
| Lists.transform(queryParametersPb, QUERY_PARAMETER_FROM_PB_FUNCTION); |
It looks like getUndeclaredQueryParameters() returns null when there are no undeclared query parameters, but this dryRun function passes that resulting value unchecked into Lists.transform which throws an NPE when the list argument is null.
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the googleapis/java-bigquery API.Issues related to the googleapis/java-bigquery API.priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-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.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.