diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java index b1a689dbb..3e218307d 100644 --- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java +++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java @@ -426,16 +426,15 @@ public com.google.api.services.bigquery.model.Job call() { } if (!idRandom) { - if (createException instanceof BigQueryException && - createException.getCause() != null ) { + if (createException instanceof BigQueryException && createException.getCause() != null) { /*GoogleJsonResponseException createExceptionCause = - (GoogleJsonResponseException) createException.getCause();*/ + (GoogleJsonResponseException) createException.getCause();*/ Pattern pattern = Pattern.compile(".*Already.*Exists:.*Job.*", Pattern.CASE_INSENSITIVE); Matcher matcher = pattern.matcher(createException.getCause().getMessage()); - if (matcher.find() ) { + if (matcher.find()) { // If the Job ALREADY EXISTS, retrieve it. Job job = this.getJob(jobInfo.getJobId()); diff --git a/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java b/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java index 9448e01e8..085dd57e7 100644 --- a/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java +++ b/google-cloud-bigquery/src/test/java/com/google/cloud/bigquery/it/ITBigQueryTest.java @@ -6080,7 +6080,11 @@ public void testForeignKeysUpdate() { @Test public void testAlreadyExistJobExceptionHandling() throws InterruptedException { - String query = "SELECT TimestampField, StringField, BooleanField FROM " +DATASET + "."+ TABLE_ID.getTable(); + String query = + "SELECT TimestampField, StringField, BooleanField FROM " + + DATASET + + "." + + TABLE_ID.getTable(); JobId jobId = JobId.newBuilder().setRandomJob().build(); JobConfiguration queryJobConfiguration = QueryJobConfiguration.newBuilder(query).build();