Return default DbInfo when connection is null (#9413)
This commit is contained in:
parent
e212e1cb94
commit
2fb000496e
|
@ -98,6 +98,9 @@ public final class JdbcUtils {
|
||||||
* connection will be stored with the DEFAULT DBInfo as the value in the connectionInfo map to
|
* connection will be stored with the DEFAULT DBInfo as the value in the connectionInfo map to
|
||||||
* avoid retry overhead.
|
* avoid retry overhead.
|
||||||
*/
|
*/
|
||||||
|
if (connection == null) {
|
||||||
|
return DbInfo.DEFAULT;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
DatabaseMetaData metaData = connection.getMetaData();
|
DatabaseMetaData metaData = connection.getMetaData();
|
||||||
String url = metaData.getURL();
|
String url = metaData.getURL();
|
||||||
|
|
Loading…
Reference in New Issue