Use stream instead of for loop
This commit is contained in:
parent
a0c7b478cb
commit
8858bd498b
@ -92,9 +92,7 @@ public class Utilities {
|
||||
if (path.getFileName().toString().equals("session.lock")) return true;
|
||||
}
|
||||
|
||||
for(String i : config.get().fileBlacklist) if(path.startsWith(i)) return true;
|
||||
|
||||
return false;
|
||||
return config.get().fileBlacklist.stream().anyMatch(path::startsWith);
|
||||
}
|
||||
|
||||
public static Optional<ConfigPOJO.ArchiveFormat> getArchiveExtension(String fileName) {
|
||||
|
Loading…
Reference in New Issue
Block a user