mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -55,7 +55,7 @@ public class DialectFactory {
|
||||
public final static String DRIVER_DM7 = "dm.jdbc.driver.DmDriver";
|
||||
|
||||
private static Map<DataSource, Dialect> dialectPool = new ConcurrentHashMap<>();
|
||||
private static Object lock = new Object();
|
||||
private static final Object lock = new Object();
|
||||
|
||||
private DialectFactory() {
|
||||
}
|
||||
|
@@ -44,7 +44,7 @@ public class DriverUtil {
|
||||
}
|
||||
|
||||
Connection conn = null;
|
||||
String driver = null;
|
||||
String driver;
|
||||
try {
|
||||
try {
|
||||
conn = ds.getConnection();
|
||||
@@ -69,7 +69,7 @@ public class DriverUtil {
|
||||
* @throws DbRuntimeException SQL异常包装,获取元数据信息失败
|
||||
*/
|
||||
public static String identifyDriver(Connection conn) throws DbRuntimeException {
|
||||
String driver = null;
|
||||
String driver;
|
||||
DatabaseMetaData meta;
|
||||
try {
|
||||
meta = conn.getMetaData();
|
||||
|
@@ -12,7 +12,7 @@ import cn.hutool.log.StaticLog;
|
||||
public class GlobalDSFactory {
|
||||
|
||||
private static volatile DSFactory factory;
|
||||
private static Object lock = new Object();
|
||||
private static final Object lock = new Object();
|
||||
|
||||
/*
|
||||
* 设置在JVM关闭时关闭所有数据库连接
|
||||
|
Reference in New Issue
Block a user