Skip to content

Commit

Permalink
fix: ClassCastException in Spring Data JDBC sample (#1595)
Browse files Browse the repository at this point in the history
  • Loading branch information
olavloite committed May 3, 2024
1 parent f54beb2 commit e96a86a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public static boolean isCloudSpannerPG(JdbcOperations operations) {
"The selected Cloud Spanner database does not use the PostgreSQL dialect");
} catch (DataAccessException exception) {
if (exception.getCause() instanceof JdbcSqlException) {
JdbcSqlException jdbcSqlException = (JdbcSqlException) exception;
JdbcSqlException jdbcSqlException = (JdbcSqlException) exception.getCause();
if (jdbcSqlException.getCode() == Code.PERMISSION_DENIED
|| jdbcSqlException.getCode() == Code.NOT_FOUND) {
throw new RuntimeException(
Expand Down

0 comments on commit e96a86a

Please sign in to comment.