@SneakyThrows mistakenly swallow checked exception in lambda without "throws" in IDEA.
Report an error in IDEA.

this is a correct behavior for me, the lambda must not throw a checked exception as Runnable.run() did not, if you want use @SneakyThrows create a method encapsulating the body of your runnable and add this annotation on it.
this is a correct behavior for me, the lambda must not throw a checked exception as Runnable.run() did not, if you want use
@SneakyThrowscreate a method encapsulating the body of your runnable and add this annotation on it.
I mean in the screenshot above, there should be a red underscore under throw new IOException("error"); and an error reported by the IDE.

It鈥檚 already the case. There is an error under the throw exception
It鈥檚 already the case. There is an error under the throw exception
If you add @SneakyThrows, the error just disappears. But when compile the code using javac, there will be a same error in line 11 and line 18.

It鈥檚 already the case. There is an error under the throw exception
If you add @SneakyThrows, the error just disappears. But when compile the code using javac, there will be a same error in line 11 and line 18.
I think too that this case shouldn't be disabled inspection IDE
I think I can fix it.
Most helpful comment
I think I can fix it.