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

Aggelos Biboudis abimpoudis at openjdk.org
Mon Nov 21 15:24:41 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:

  Update copyright year

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

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

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

  Stats: 1 line in 1 file changed: 0 ins; 0 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