This is a clean backport of JDK-8345573 to the stabilization repo branch of JDK 24 GA.
------------- Commit messages: - Backport 11cd639842b61952755ad83e88446c91237c19f5 Changes: https://git.openjdk.org/jdk/pull/22738/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=22738&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8345573 Stats: 290 lines in 5 files changed: 90 ins; 106 del; 94 mod Patch: https://git.openjdk.org/jdk/pull/22738.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/22738/head:pull/22738 PR: https://git.openjdk.org/jdk/pull/22738