From 9c98d6470d7633c3a960bde47d65072cb70b13b9 Mon Sep 17 00:00:00 2001 From: "Andreas Penski (init)" Date: Thu, 20 Aug 2020 16:50:37 +0200 Subject: [PATCH] (chore) no stacktrace, when not targets supplied --- src/main/java/de/kosit/validationtool/cmd/Validator.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/kosit/validationtool/cmd/Validator.java b/src/main/java/de/kosit/validationtool/cmd/Validator.java index 2303f6e..0c9d5fd 100644 --- a/src/main/java/de/kosit/validationtool/cmd/Validator.java +++ b/src/main/java/de/kosit/validationtool/cmd/Validator.java @@ -196,7 +196,7 @@ public class Validator { return check.isSuccessful(results) ? 0 : 1; } catch (final Exception e) { - e.printStackTrace();// NOSONAR + Printer.writeErr(e.getMessage()); if (cmd.hasOption(DEBUG.getOpt())) { log.error(e.getMessage(), e); } else { @@ -219,8 +219,7 @@ public class Validator { } private static void printScenarios(final Configuration configuration) { - Printer.writeOut("Loaded \"{0}\" by {1} from {2} ", configuration.getName(), configuration.getAuthor(), - configuration.getDate()); + Printer.writeOut("Loaded \"{0}\" by {1} from {2} ", configuration.getName(), configuration.getAuthor(), configuration.getDate()); Printer.writeOut("\nThe following scenarios are available:"); configuration.getScenarios().forEach(e -> { final Line line = new Line(Code.GREEN); @@ -291,7 +290,7 @@ public class Validator { private static Collection listDirectoryTargets(final Path d) { try ( final Stream stream = Files.list(d) ) { - return stream.filter(path -> path.toString().endsWith(".xml")).collect(Collectors.toList()); + return stream.filter(path -> path.toString().toLowerCase().endsWith(".xml")).collect(Collectors.toList()); } catch (final IOException e) { throw new IllegalStateException("IOException while list directory content. Can not determine test targets.", e); }