Skip to content

Commit

Permalink
Return default DbInfo when connection is null
Browse files Browse the repository at this point in the history
  • Loading branch information
ebyhr committed Sep 8, 2023
1 parent 9cf710f commit 81b9448
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ public static DbInfo computeDbInfo(Connection connection) {
* 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();
Expand Down

0 comments on commit 81b9448

Please sign in to comment.