Clean backport of the https://github.com/openjdk/jdk/pull/29104 PR
------------- Commit messages: - Backport 8737a8ca73952d60129e7fc2f7e17eea3b800af7 Changes: https://git.openjdk.org/jdk/pull/29238/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29238&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8373448 Stats: 37 lines in 2 files changed: 31 ins; 0 del; 6 mod Patch: https://git.openjdk.org/jdk/pull/29238.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29238/head:pull/29238 PR: https://git.openjdk.org/jdk/pull/29238
