Collection<FilePatch> () { List<PatchAndFile> failedTextPatches = ContainerUtil.findAll(myTextPatches, textPatch -> !isFileTypeOk(textPatch.getFile())); myTextPatches.removeAll(failedTextPatches); return ContainerUtil.map(failedTextPatches, patchInfo -> patchInfo.getApplyPatch().getPatch()); }