ValidationResult (File toFile, ValidationResult.Action action) { List<NativeFileManager.Process> processes = NativeFileManager.getProcessesUsing(toFile); if (processes.isEmpty()) return null; var message = UpdaterUI.message("file.locked", processes.stream().map(p -> "[" + p.pid + "] " + p.name).collect(Collectors.joining(", "))); return new ValidationResult(ValidationResult.Kind.ERROR, getReportPath(), action, message, ValidationResult.Option.KILL_PROCESS); }