fix: error ... executing doInBackground() #138 (#139)

As requested in ST 1341351, this PR replaces the throw if `files` is null.
This commit is contained in:
Dick Smith
2018-09-11 02:04:26 -04:00
committed by vakrilov
parent ebcda8e4d3
commit 85965eb484

View File

@@ -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()) {