From d6f0c306f2aa70ff2f1415cb4d5fd70d0eaa8cb4 Mon Sep 17 00:00:00 2001 From: felsenhower <4felgenh@informatik.uni-hamburg.de> Date: Fri, 7 Oct 2016 19:24:08 +0200 Subject: [PATCH] Minor beautification --- .../stine_calendar_bot/main/CallLevelWrapper.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/felsenhower/stine_calendar_bot/main/CallLevelWrapper.java b/src/main/java/felsenhower/stine_calendar_bot/main/CallLevelWrapper.java index 499c4ac..2401b24 100644 --- a/src/main/java/felsenhower/stine_calendar_bot/main/CallLevelWrapper.java +++ b/src/main/java/felsenhower/stine_calendar_bot/main/CallLevelWrapper.java @@ -160,14 +160,14 @@ public CallLevelWrapper(String[] args) throws IOException { // hookers. try { System.err.println(messages.get("MissingRequiredOption", ((List) (e.getMissingOptions())).stream() - .filter(Object.class::isInstance).map(Object.class::cast).flatMap(o -> { + .filter(Object.class::isInstance).map(Object.class::cast).map(o -> { if (o instanceof String) { - return Collections.singletonList(options.getOption((String) o)).stream(); + return Collections.singletonList(options.getOption((String) o)); } else { - return ((OptionGroup) o).getOptions().stream(); + return ((OptionGroup) o).getOptions(); } - }).filter(Option.class::isInstance).map(Option.class::cast).map(o -> o.getLongOpt()) - .collect(Collectors.joining(", ")))); + }).flatMap(o -> o.stream()).filter(Option.class::isInstance).map(Option.class::cast) + .map(o -> o.getLongOpt()).collect(Collectors.joining(", ")))); this.printHelp(); } catch (Exception totallyMoronicException) { throw new RuntimeException("I hate 3rd party libraries!", totallyMoronicException);