RFR: 8262095: NPE in Flow$FlowAnalyzer.visitApply: Cannot invoke getThrownTypes because tree.meth.type is null

Jan Lahoda jlahoda at openjdk.java.net
Tue Aug 31 15:09:28 UTC 2021


On Mon, 30 Aug 2021 18:08:49 GMT, Vicente Romero <vromero at openjdk.org> wrote:

> Please review this PR which is not filtering errors for cases when the error is reported in a lambda expression. Before the fix for [JDK-8205418](https://bugs.openjdk.java.net/browse/JDK-8205418) javac was a bit more aggressive reporting errors found during recovery. 
> 
> After the fix mentioned above, the intention was to try to generate better error messages by attributing deferred nodes with more precise targets. But for some cases like the one reported in the bug entry, javac would swallow the error report. This fix is just reporting the errors right away if its position is a lambda expression.
> 
> Thanks,
> Vicente

Seems sensible to me.

-------------

Marked as reviewed by jlahoda (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/5307


More information about the compiler-dev mailing list