mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
file empty return true
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
* 【core 】 BeanUtil.copyToList增加重载(pr#321@Gitee)
|
||||
* 【core 】 SyncFinisher增加stop方法(issue#1578@Github)
|
||||
* 【cache 】 CacheObj默认方法改为protected(issue#I3RIEI@Gitee)
|
||||
* 【core 】 FileUtil.isEmpty不存在时返回true(issue#1582@Github)
|
||||
|
||||
### 🐞Bug修复
|
||||
* 【core 】 修复XmlUtil中omitXmlDeclaration参数无效问题(issue#1581@Github)
|
||||
|
@@ -127,7 +127,7 @@ public class FileUtil extends PathUtil {
|
||||
* @return 是否为空,当提供非目录时,返回false
|
||||
*/
|
||||
public static boolean isEmpty(File file) {
|
||||
if (null == file) {
|
||||
if (null == file || false == file.exists()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user