Handle null pointer in Tools.lastFileModified()

Fixes #2883
Fixes #2958
Fixes #2959
This commit is contained in:
Duy Tran Khanh 2022-03-27 04:47:50 +07:00 committed by GitHub
parent eedfd54d12
commit 252b5e0471
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -663,6 +663,9 @@ public final class Tools {
File fl = new File(dir);
File[] files = fl.listFiles(File::isFile);
if (files == null) {
return null;
}
long lastMod = Long.MIN_VALUE;
File choice = null;