Merge branch '3.4.x'

Closes gh-44973
This commit is contained in:
Andy Wilkinson
2025-04-02 10:41:17 +01:00
12 changed files with 79 additions and 115 deletions

View File

@@ -20,7 +20,7 @@ import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* User provided hint for an otherwise missing file extension.
* User-provided hint for an otherwise missing file extension.
*
* @author Phillip Webb
*/

View File

@@ -163,10 +163,8 @@ public enum EmbeddedDatabaseConnection {
* @return true if the data source is one of the embedded types
*/
public static boolean isEmbedded(DataSource dataSource) {
try {
try (Connection connection = dataSource.getConnection()) {
return new IsEmbedded().apply(connection);
}
try (Connection connection = dataSource.getConnection()) {
return new IsEmbedded().apply(connection);
}
catch (SQLException ex) {
// Could not connect, which means it's not embedded