Skip to content

Unchecked NPE in ConnectionImpl:dryRun #2895

@jacksonquinn

Description

@jacksonquinn

Hello! We're getting a NPE resulting from ConnectionImpl:dryRun here:

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.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