Closed
Description
Follow on from #17 (which still exists): listJobs is ALSO throwing NPE:
java.lang.NullPointerException: null
at com.google.cloud.bigquery.JobStatistics.fromPb(JobStatistics.java:1183)
at com.google.cloud.bigquery.JobInfo$BuilderImpl.<init>(JobInfo.java:154)
at com.google.cloud.bigquery.Job.fromPb(Job.java:485)
at com.google.cloud.bigquery.BigQueryImpl$32.apply(BigQueryImpl.java:1127)
at com.google.cloud.bigquery.BigQueryImpl$32.apply(BigQueryImpl.java:1124)
at com.google.common.collect.Iterators$6.transform(Iterators.java:783)
at com.google.common.collect.TransformedIterator.next(TransformedIterator.java:47)
This is clearly dependent on the data the server is sending; in your tests you are not reproducing the server-side situation that we have; I don't know what that server side situation is, but I know it exists. In both this case and case #17, the client needs to be much more defensively programmed.
JobConfiguration jobConfigPb = jobPb.getConfiguration(); // RETURNS NULL
com.google.api.services.bigquery.model.JobStatistics statisticPb = jobPb.getStatistics();
if (jobConfigPb.getLoad() != null) { // NPE