@@ -496,27 +496,24 @@ public com.google.api.services.bigquery.model.Job call() throws IOException {
496496 createException = e ;
497497 }
498498
499- if (!idRandom ) {
500- if (createException instanceof BigQueryException
501- && createException .getCause () != null
502- && createException .getCause ().getMessage () != null ) {
503-
504- /*GoogleJsonResponseException createExceptionCause =
505- (GoogleJsonResponseException) createException.getCause();*/
506-
507- Pattern pattern = Pattern .compile (".*Already.*Exists:.*Job.*" , Pattern .CASE_INSENSITIVE );
508- Matcher matcher = pattern .matcher (createException .getCause ().getMessage ());
509-
510- if (matcher .find ()) {
511- // If the Job ALREADY EXISTS, retrieve it.
512- Job job = this .getJob (jobInfo .getJobId (), JobOption .fields (JobField .STATISTICS ));
513-
514- long jobCreationTime = job .getStatistics ().getCreationTime ();
515- long jobMinStaleTime = System .currentTimeMillis ();
516- long jobMaxStaleTime =
517- java .time .Instant .ofEpochMilli (jobMinStaleTime )
518- .minus (1 , java .time .temporal .ChronoUnit .DAYS )
519- .toEpochMilli ();
499+ if (!idRandom ) {
500+ if (createException instanceof BigQueryException
501+ && createException .getCause () != null
502+ && createException .getCause ().getMessage () != null ) {
503+
504+ Pattern pattern = Pattern .compile (".*Already.*Exists:.*Job.*" , Pattern .CASE_INSENSITIVE );
505+ Matcher matcher = pattern .matcher (createException .getCause ().getMessage ());
506+
507+ if (matcher .find ()) {
508+ // If the Job ALREADY EXISTS, retrieve it.
509+ Job job = this .getJob (jobInfo .getJobId (), JobOption .fields (JobField .STATISTICS ));
510+
511+ long jobCreationTime = job .getStatistics ().getCreationTime ();
512+ long jobMinStaleTime = System .currentTimeMillis ();
513+ long jobMaxStaleTime =
514+ java .time .Instant .ofEpochMilli (jobMinStaleTime )
515+ .minus (1 , java .time .temporal .ChronoUnit .DAYS )
516+ .toEpochMilli ();
520517
521518 // Only return the job if it has been created in the past 24 hours.
522519 // This is assuming any job older than 24 hours is a valid duplicate JobID
0 commit comments