mirror of
https://gitee.com/dromara/hutool.git
synced 2025-07-15 23:13:33 +08:00
fix null bug
This commit is contained in:
parent
368a5e4d1c
commit
e8c0a75e7f
@ -19,6 +19,7 @@
|
||||
* 【json 】 修复JSONConvert转换日期空指针问题(issue#I1F8M2@Gitee)
|
||||
* 【core 】 修复XML中带注释Xpath解析导致空指针问题(issue#I1F2WI@Gitee)
|
||||
* 【core 】 修复FileUtil.rename原文件无扩展名多点的问题(issue#839@Github)
|
||||
* 【db 】 修复DbUtil.close可能存在的空指针问题(issue#847@Github)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
## 5.3.1 (2020-04-17)
|
||||
|
@ -152,6 +152,7 @@ public final class DbUtil {
|
||||
*/
|
||||
public static void close(Object... objsToClose) {
|
||||
for (Object obj : objsToClose) {
|
||||
if(null != obj){
|
||||
if (obj instanceof AutoCloseable) {
|
||||
IoUtil.close((AutoCloseable) obj);
|
||||
} else {
|
||||
@ -159,6 +160,7 @@ public final class DbUtil {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获得默认数据源
|
||||
|
Loading…
Reference in New Issue
Block a user