-
Notifications
You must be signed in to change notification settings - Fork 139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Eclipse compiler incorrectly reports unhandled exceptions on lamba code #2065
Comments
I think this is the same problem as #1181 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=547231) for which a fix is available. @stephan-herrmann - let us resurrect that discussion - It is sad/bad we reject code while trying to implement withdrawn stipulations of specification. The reported problem goes away with the candidate fix |
I'm sorry I dropped the ball in #1181. Definitely something we should resume. To be clear, my reluctance in #1181 is based on lack of understanding on my part not on actual doubts about the fix. I'll give it one more try to coerce the compiler into interesting code paths. If that doesn't give a clearer picture I'll just have to trust your reasoning (which sounded fine in the first place). |
in compilation failure Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=547231 * Fixes eclipse-jdt#2065
I have added the test case from here to the PR https://github.com/eclipse-jdt/eclipse.jdt.core/pull/1181created for #1169. With that I will close this as a duplicate of #1169 |
in compilation failure Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=547231 * Fixes eclipse-jdt#2065
in compilation failure Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=547231 * Fixes eclipse-jdt#2065
…s in compilation failure (#1181) * Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=547231 * Fixes #2065
…s in compilation failure (eclipse-jdt#1181) * Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=547231 * Fixes eclipse-jdt#2065
…s in compilation failure (eclipse-jdt#1181) * Fixes https://bugs.eclipse.org/bugs/show_bug.cgi?id=547231 * Fixes eclipse-jdt#2065
I get unhandled exception errors on code that uses Apache Commons Lang 3's Failable class. For easy reproduction I have put the lambas in a single class so it can be investigated without the Commons Lang dependency. The code below reproduces the issue on Eclipse 2023-12 (4.30.0) and in a Maven build using
org.eclipse.jdt:ecj:3.36.0
as the compiler. Using Oracle's javac for Java 17 it compiles fine without errors.There are 4 unhandled exceptions errors reported in the
getFoobarClasses
method even though theget()
method catches these and rethrows them as RuntimeExceptions.Have I run into a bug? Searching past issues it looks a bit like #1162 although no
@SneakyThrows
annotation is used in the code above.The text was updated successfully, but these errors were encountered: