@@ -496,24 +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- 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 ();
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 ();
517517
518518 // Only return the job if it has been created in the past 24 hours.
519519 // This is assuming any job older than 24 hours is a valid duplicate JobID
0 commit comments