Merge branch '3.2.x'

Closes gh-39077
This commit is contained in:
Moritz Halbritter 2024-01-10 09:49:54 +01:00
commit ffe31cfe55

View File

@ -46,8 +46,7 @@ final class SqlDialectLookup {
* @return the most suitable {@link SQLDialect} * @return the most suitable {@link SQLDialect}
*/ */
static SQLDialect getDialect(DataSource dataSource) { static SQLDialect getDialect(DataSource dataSource) {
try { try (Connection connection = (dataSource != null) ? dataSource.getConnection() : null) {
Connection connection = (dataSource != null) ? dataSource.getConnection() : null;
return JDBCUtils.dialect(connection); return JDBCUtils.dialect(connection);
} }
catch (SQLException ex) { catch (SQLException ex) {