<div dir="ltr"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I still say it's not a big enough problem to worry about. If you're "going around" the JLS with tricks, some JLS guarantees are invalidated, just like with unchecked casts, etc.</div></div></blockquote><div><br></div><div>The reason I would worry is because there are languages like Kotlin and from its own perspective it is perfectly fine to throw any exception. And someone might want to call it from Java (not realizing the possibility). I think this is worse than unchecked casts and whatnot, because it doesn't blow up in your face. You will just get an impossible value (likely 0 or similar) which would be very hard to track down if it happens. Given that you are catching the exception, you might not even get to see the stacktrace in the logs. I think this would only be an acceptable risk if the compiler would protect you from such exceptions by wrapping the checked exception into an unchecked one.</div></div></div>