mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
As requested in ST 1341351, this PR replaces the throw if `files` is null.
This commit is contained in:
@@ -254,7 +254,7 @@ public final class DiskLruCache implements Closeable {
|
|||||||
public static void deleteContents(File dir) throws IOException {
|
public static void deleteContents(File dir) throws IOException {
|
||||||
File[] files = dir.listFiles();
|
File[] files = dir.listFiles();
|
||||||
if (files == null) {
|
if (files == null) {
|
||||||
throw new IllegalArgumentException("not a directory: " + dir);
|
return;
|
||||||
}
|
}
|
||||||
for (File file : files) {
|
for (File file : files) {
|
||||||
if (file.isDirectory()) {
|
if (file.isDirectory()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user