On Tue, 18 May 2021 20:59:49 GMT, Claes Redestad <redes...@openjdk.org> wrote:
> Using a switch expression instead of a (read-only) static `HashMap` reduces > initialization overhead of `VarHandle$AccessMode`. This gets loaded earlier > after JDK-8265079, so it started showing up in a few lambda startup tests. > > This also obsoletes a jtreg test that only verified that this map was > optimally sized. LGTM. I assume existing tests verify that all values of the enum are covered by the switch? ------------- Marked as reviewed by jvernee (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/4102