mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 16:55:39 +00:00
Dateien werden erst gelesen, wenn sie verarbeitet werden. Ergebnisse von vorherigen Läufen werden nicht mehr Speicher gehalten bis alle Dateien verarbeitet sind
This commit is contained in:
parent
7992024451
commit
066974886b
2 changed files with 28 additions and 28 deletions
|
|
@ -28,10 +28,15 @@ import java.nio.file.Paths;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import org.apache.commons.cli.*;
|
||||
import org.apache.commons.cli.CommandLine;
|
||||
import org.apache.commons.cli.CommandLineParser;
|
||||
import org.apache.commons.cli.DefaultParser;
|
||||
import org.apache.commons.cli.HelpFormatter;
|
||||
import org.apache.commons.cli.Option;
|
||||
import org.apache.commons.cli.Options;
|
||||
import org.apache.commons.cli.ParseException;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -151,9 +156,12 @@ public class CommandLineApplication {
|
|||
|
||||
final Collection<Path> targets = determineTestTargets(cmd);
|
||||
start = System.currentTimeMillis();
|
||||
final List<Input> input = targets.stream().map(InputFactory::read).collect(Collectors.toList());
|
||||
boolean result = check.checkInput(input);
|
||||
log.info("Processing {} object(s) completed in {}ms", input.size(), System.currentTimeMillis() - start);
|
||||
for (Path p : targets) {
|
||||
final Input input = InputFactory.read(p);
|
||||
check.checkInput(input);
|
||||
}
|
||||
boolean result = check.printAndEvaluate();
|
||||
log.info("Processing {} object(s) completed in {}ms", targets.size(), System.currentTimeMillis() - start);
|
||||
return result ? 0 : 1;
|
||||
|
||||
} catch (Exception e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue