Здравствуйте! Кто подскажет почему ругается валидатор и что ему не хватает?
package com.javarush.task.task31.task3101;
import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.List;
/*
Проход по дереву файлов
*/
public class Solution {
public static void main(String[] args) {
if (args.length == 0) return;
File folder = new File(args[0]);
File oldFile = new File(args[1]);
File newFile = new File(oldFile.getParent() + "/allFilesContent.txt");
FileUtils.renameFile(oldFile, newFile);
if (FileUtils.isExist(newFile)) {
try (FileOutputStream writer = new FileOutputStream(newFile, false)) {
List <File> fileList = new ArrayList<>();
walk(folder, fileList);
for (File file : fileList) {
try (FileInputStream reader = new FileInputStream(file)) {
if (file.length() < 50L) {
byte[] data = new byte[(int)file.length()];
reader.read(data);
writer.write(data);
writer.write("\n".getBytes(StandardCharsets.UTF_8));
}
} catch (IOException e) {
e.printStackTrace();
}
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
public static void walk(File folder, List<File> fileList) {
File[] list = folder.listFiles();
if (list == null) return;
for (File entity : list) {
if (entity.isDirectory()) {
walk(entity, fileList);
} else {
fileList.add(entity);
}
}
}
}