Re:Unchecked Java: Say Goodbye to Checked Exceptions Forever
by rogerkeays on Friday July 14, 2023 @04:20AM
(#36720895)
Good point. Actually the plugin didn't handle this case either (fixed now). Thanks for the feedback.
So yes, you can throw IOException masking it to RuntimeException, however you can't catch it later without another gimmicks like catching Exception and checking if it's IOException (and even that check causes linter warnings in Idea, so now you need to suppress those warnings...).
Throwing and catching UncheckedIOException does not have this problem.