Is it possible to run a method, in a consumer, like a method reference, but on the object passed to the consumer:
Arrays.stream(log.getHandlers()).forEach(h ->
I suppose it should be:
Arrays.stream(log.getHandlers()).forEach(Handler::close);
Provided the log.getHandlers() returns an array of objects of type Handler.
log.getHandlers()
Handler