mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
Simplify optional call chain
GitOrigin-RevId: faa12da5460431ff3edc081553a764fe7ab48c4e
This commit is contained in:
committed by
intellij-monorepo-bot
parent
188434d9d9
commit
9f7df4c30b
@@ -70,7 +70,7 @@ public class DeleteAction extends PatchAction {
|
||||
boolean canDelete = true;
|
||||
if (Files.isDirectory(toFile.toPath(), LinkOption.NOFOLLOW_LINKS)) {
|
||||
try (Stream<Path> children = Files.list(toFile.toPath())) {
|
||||
canDelete = !children.findAny().isPresent();
|
||||
canDelete = children.findAny().isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user