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

Vicente Romero vromero at openjdk.java.net
Mon Aug 30 18:16:44 UTC 2021


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

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

Commit messages:
 - 8262095: NPE in Flow.visitApply: Cannot invoke getThrownTypes because tree.meth.type is null

Changes: https://git.openjdk.java.net/jdk/pull/5307/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5307&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8262095
  Stats: 26 lines in 3 files changed: 25 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5307.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5307/head:pull/5307

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


More information about the compiler-dev mailing list