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. ------------- Commit messages: - Remove obsolete test - Transform AccessMode name map into switch expression Changes: https://git.openjdk.java.net/jdk/pull/4102/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4102&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8267321 Stats: 90 lines in 2 files changed: 31 ins; 56 del; 3 mod Patch: https://git.openjdk.java.net/jdk/pull/4102.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4102/head:pull/4102 PR: https://git.openjdk.java.net/jdk/pull/4102