Skip to content

Commit c52e956

Browse files
committed
remove extra catch block
1 parent 902f799 commit c52e956

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

java-bigquery-jdbc/src/main/java/com/google/cloud/bigquery/jdbc/BigQueryConnection.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,9 +1336,6 @@ public synchronized List<String> getDiscoveredProjects() throws SQLException {
13361336
projects.add(project.getProjectId());
13371337
}
13381338
this.discoveredProjectsCache = ImmutableList.copyOf(projects);
1339-
} catch (BigQueryException e) {
1340-
throw new BigQueryJdbcException(
1341-
"Failed to list all accessible projects due to BigQuery error.", e);
13421339
} catch (Exception e) {
13431340
throw new BigQueryJdbcException("Failed to list all accessible projects.", e);
13441341
}

java-bigquery-jdbc/src/test/java/com/google/cloud/bigquery/jdbc/BigQueryConnectionTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -570,9 +570,7 @@ public void testGetDiscoveredProjects_BigQueryExceptionThrown() throws Exception
570570
() -> {
571571
connection.getDiscoveredProjects();
572572
});
573-
assertTrue(
574-
ex.getMessage()
575-
.contains("Failed to list all accessible projects due to BigQuery error."));
573+
assertTrue(ex.getMessage().contains("Failed to list all accessible projects."));
576574
assertEquals(exception, ex.getCause());
577575

578576
// Subsequent call should retry since no cache is set

0 commit comments

Comments
 (0)