Closed leaumar closed 7 years ago
Is there a FunctionalInterface in the JVM with a void no-args method that throws an Exception to reuse? Runnable doesn't throw an exception, so it wouldn't fit the bill here.
org.jooq.lambda.fi.lang.CheckedRunnable
seems to be the type you're looking for.
Indeed, thanks! Overlooked it because I linked it with threading and those kind of Runnables...
Yeah, it's a historic type also in the JDK: java.lang.Runnable
. There's no new Java 8 functional interface of that type, given that Runnable
is already sufficient.
I seem to be missing a helper function in Unchecked that would allow me to wrap a method that neither takes arguments nor returns anything, just performs work and might throw an exception. I can find neither it nor a note explaining why it isn't there.
I mean something like this:
Is there a reason why it doesn't exist, or could it be added in an update?