Skip to content
Permalink
Browse files
fix: nullpointer exception when executionerror is null (#754)
  • Loading branch information
Praful Makani committed Sep 24, 2020
1 parent 7258ada commit 03bda1bf79169bf0fca3ee12c1c3dfeb19c2e102
Showing with 4 additions and 2 deletions.
  1. +4 −2 google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Job.java
@@ -297,8 +297,10 @@ public TableResult getQueryResults(QueryResultsOption... options)
job = reload();
}
if (job.getStatus() != null && job.getStatus().getError() != null) {
throw new JobException(
getJobId(), ImmutableList.copyOf(job.getStatus().getExecutionErrors()));
throw new BigQueryException(
job.getStatus().getExecutionErrors() == null
? ImmutableList.of(job.getStatus().getError())
: ImmutableList.copyOf(job.getStatus().getExecutionErrors()));
}

// If there are no rows in the result, this may have been a DDL query.

0 comments on commit 03bda1b

Please sign in to comment.