BAEL-6865, implemented review comments

This commit is contained in:
parthiv39731 2023-08-29 20:16:37 -07:00
parent bd869f214e
commit 9e0223b28f

View File

@ -87,8 +87,8 @@ public class AggregateExceptionHandlerUnitTest {
List<String> strings = List.of("1", "2", "3", "a", "b", "c"); List<String> strings = List.of("1", "2", "3", "a", "b", "c");
strings.stream() strings.stream()
.map(str -> Try.of(() -> Integer.parseInt(str)).toEither()) .map(str -> Try.of(() -> Integer.parseInt(str)).toEither())
.collect(Collectors.collectingAndThen(Collectors.partitioningBy(Either::isLeft, Collectors.toList()) .collect(Collectors.collectingAndThen(Collectors.partitioningBy(Either::isLeft, Collectors.toList()),
, map -> handleErrorsAndOutputForEither(map))); map -> handleErrorsAndOutputForEither(map)));
} }
private static void processThrowsExAndNoOutput(String input) { private static void processThrowsExAndNoOutput(String input) {
@ -142,7 +142,7 @@ public class AggregateExceptionHandlerUnitTest {
if (result.getException().isPresent()) { if (result.getException().isPresent()) {
logger.error("Process Exception " + result.getException().get()); logger.error("Process Exception " + result.getException().get());
} else { } else {
logger.info("Process Result" + result.getResult()); logger.info("Process Result" + result.getResult().get());
} }
}); });
return "Errors and Output Handled"; return "Errors and Output Handled";