RFR: 8294583: JShell: NPE in switch with non existing record pattern [v2]

Aggelos Biboudis abimpoudis at openjdk.org
Mon Nov 21 15:19:39 UTC 2022


> This fixes a situation where attribution errors are not short circuiting the compilation of an expression, e.g., in case of a declaration missing in the JShell evaluation of a switch expression.
> 
> Now there are two options:
> 
> 1. handle this in `handleSwitch` (specific to switches, and avoid the `NPE` raised according to the JBS description)
> 2. handle this centrally in the corresponding task that is used in two places: 1) JShell evaluation and 2) `tools.javac.combo`.
> 
> I adopted the second option. Any thoughts?

Aggelos Biboudis has updated the pull request incrementally with one additional commit since the last revision:

  Address review

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/11251/files
  - new: https://git.openjdk.org/jdk/pull/11251/files/df5e143e..696c03ed

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=11251&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11251&range=00-01

  Stats: 6 lines in 2 files changed: 1 ins; 4 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/11251.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11251/head:pull/11251

PR: https://git.openjdk.org/jdk/pull/11251


More information about the compiler-dev mailing list