Return default DbInfo when connection is null (#9413)

This commit is contained in:
Yuya Ebihara 2023-09-09 00:50:58 +09:00 committed by GitHub
parent e212e1cb94
commit 2fb000496e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -98,6 +98,9 @@ public final class JdbcUtils {
* connection will be stored with the DEFAULT DBInfo as the value in the connectionInfo map to
* avoid retry overhead.
*/
if (connection == null) {
return DbInfo.DEFAULT;
}
try {
DatabaseMetaData metaData = connection.getMetaData();
String url = metaData.getURL();