You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.
I haven't been able to update my lombok plugin for several versions, because every time I do, it incorrectly marks catch clauses as impossible. Here is an example that captures the gist of what my code looks like:
@SneakyThrows
private void hideIt() {
try {
itThrows(true);
} catch (IOException e) { // <=== IntelliJ flags this catch as an error
e.printStackTrace();
}
}
private void itThrows(boolean foo) throws Exception {
if (foo) {
throw new IOException("test");
} else {
throw new Exception("test2");
}
}
Since somewhere around plugin version 0.9.0, IntelliJ marks the catch in itThrows() as impossible ("Exception 'java.io.IOException' is never thrown in the corresponding try block"). But it is clearly possible, and javac is fine with this code. If I remove the @SneakyThrows annotation on hideIt(), the error goes away (and it complains that I need to catch or declare Exception).
The text was updated successfully, but these errors were encountered:
I haven't been able to update my lombok plugin for several versions, because every time I do, it incorrectly marks catch clauses as impossible. Here is an example that captures the gist of what my code looks like:
Since somewhere around plugin version 0.9.0, IntelliJ marks the catch in itThrows() as impossible ("Exception 'java.io.IOException' is never thrown in the corresponding try block"). But it is clearly possible, and javac is fine with this code. If I remove the @SneakyThrows annotation on hideIt(), the error goes away (and it complains that I need to catch or declare Exception).
The text was updated successfully, but these errors were encountered: