Java 8: Mandatory checked exceptions handling in lambda expressions. Why mandatory, not optional?
Not sure I really answer your question, but couldn’t you simply use something like that? public final class SupplierUtils { private SupplierUtils() { } public static <T> Supplier<T> wrap(Callable<T> callable) { return () -> { try { return callable.call(); } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } … Read more