Closed cvgaviao closed 2 years ago
Thanks for your message.
Unchecked::consumer
wraps a CheckedConsumer<T>
to produce a JDK Consumer<T>
. It does not have any side effect, let alone run your consumer, so your statement does not have any effect.
You probably meant to write this?
pRowDataStream.get().forEach(Unchecked.consumer(
r -> {
pw.printRecord((Object[]) r);
counter.incrementAndGet();
},
pExceptionHandler
));
Expected behavior and actual behavior:
I've wrapped a method that throws an exception inside the Unchecked.consumer I was expecting this method to be called, but strangely it is not.
Steps to reproduce the problem:
I've tried to setup a breakpoint inside the method, but eclipse just pass for it and don't stop.
Versions: