RFR: 8355335: Avoid pattern matching switches in core ClassFile API

Chen Liang liach at openjdk.org
Tue Apr 22 23:33:49 UTC 2025


A few pattern matching switches exist in the core parts of ClassFile API responsible for transformations and parsing. They are likely to be used in early bootstrap, and pattern matching switches require bootstrap methods, which depend on core ClassFile API.

For example, currently BlockCodeBuilderImpl prevents BlockCodeBuilder from being used in early bootstrap; luckily we are currently all using manual labels, and as a result this does not surface in lambdas.

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

Commit messages:
 - 8355335: Avoid pattern matching switches in core ClassFile API

Changes: https://git.openjdk.org/jdk/pull/24807/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24807&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8355335
  Stats: 35 lines in 6 files changed: 4 ins; 7 del; 24 mod
  Patch: https://git.openjdk.org/jdk/pull/24807.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24807/head:pull/24807

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


More information about the core-libs-dev mailing list