Simplify code syntax using Java 8 features
Change-Id: I3e59f0c38e4047595374a951619c9b43a46901df
This commit is contained in:
@@ -43,7 +43,6 @@ import org.lineageos.updater.model.UpdateInfo;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FilenameFilter;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Enumeration;
|
||||
@@ -246,12 +245,8 @@ public class Utils {
|
||||
}
|
||||
|
||||
public static void removeUncryptFiles(File downloadPath) {
|
||||
File[] uncryptFiles = downloadPath.listFiles(new FilenameFilter() {
|
||||
@Override
|
||||
public boolean accept(File dir, String name) {
|
||||
return name.endsWith(Constants.UNCRYPT_FILE_EXT);
|
||||
}
|
||||
});
|
||||
File[] uncryptFiles = downloadPath.listFiles(
|
||||
(dir, name) -> name.endsWith(Constants.UNCRYPT_FILE_EXT));
|
||||
if (uncryptFiles == null) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user