все коллекции заполняются, все удаляется как в условии описано, а проверку не проходит, помогите мне,бестолковому)
package com.javarush.task.task17.task1721;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
/*
Транзакционность
*/
public class Solution {
public static List<String> allLines = new ArrayList<String>();
public static List<String> forRemoveLines = new ArrayList<String>();
public static void main(String[] args) {
Solution sol = new Solution();
try {
sol.joinData();
} catch (CorruptedDataException e) {
e.printStackTrace();
}
}
public void joinData() throws CorruptedDataException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try {
allLines= Files.readAllLines(Paths.get(reader.readLine()));
forRemoveLines=Files.readAllLines(Paths.get(reader.readLine()));
} catch (IOException e) {
e.printStackTrace();
}
if(allLines.containsAll(forRemoveLines)){
allLines.removeAll(forRemoveLines);
}else{
allLines.clear();
throw new CorruptedDataException();
}
}
}