[jdk17u-dev] RFR: 8278834: Error "Cannot read field "sym" because "this.lvar[od]" is null" when compiling

Paul Hohensee phh at openjdk.org
Wed Feb 15 16:20:23 UTC 2023


On Wed, 1 Feb 2023 01:11:30 GMT, Glavo <duke at openjdk.org> wrote:

> 8278834: Error "Cannot read field "sym" because "this.lvar[od]" is null" when compiling

I'm not a javac expert, but this looks like a fix for a case where expected state (currentMethodSym) could be silently trashed, resulting in a later NPE. The code is tip is more complex, but retains the "restoration of state" idea in this code. Also, the patch includes a test (which passes) derived from the one attached to the original JBS issue.

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

Marked as reviewed by phh (Reviewer).

PR: https://git.openjdk.org/jdk17u-dev/pull/1141


More information about the jdk-updates-dev mailing list