Clean backport of [JDK-8345259](https://bugs.openjdk.org/browse/JDK-8345259) to JDK 24 which has JEP 493.
------------- Commit messages: - Backport bcb1bdaae772c752d54939dae3a0d95892acc228 Changes: https://git.openjdk.org/jdk/pull/22849/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22849&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8345259 Stats: 258 lines in 6 files changed: 151 ins; 44 del; 63 mod Patch: https://git.openjdk.org/jdk/pull/22849.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22849/head:pull/22849 PR: https://git.openjdk.org/jdk/pull/22849