Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ public SynchronizingFileVisitor(Path src, Path dest, boolean skipNewerInDestinat
static int walkDirectories(List<Path> srcDest, boolean skipNewerInDestination,
FileProcessor fileProcessor
) {
final Path dest = srcDest.getLast();
// TODO can use getLast() with java 21
final Path dest = srcDest.get(srcDest.size() - 1);

for (final Path src : srcDest.subList(0, srcDest.size() - 1)) {
if (Files.isDirectory(src)) {
Expand Down