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

Adam Sotona asotona at openjdk.org
Wed Apr 23 09:55:56 UTC 2025


On Tue, 22 Apr 2025 23:28:38 GMT, Chen Liang <liach at openjdk.org> wrote:

> 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.

Yes, Class-File API use in JDK bootstrap should be safe.

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

Marked as reviewed by asotona (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/24807#pullrequestreview-2786709255


More information about the core-libs-dev mailing list