Clean backport of the https://github.com/openjdk/jdk/pull/28912 PR.
------------- Commit messages: - Backport 2d0928406027a848cf2d2d0574024970b8fb535c Changes: https://git.openjdk.org/jdk/pull/29239/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29239&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8373105 Stats: 8 lines in 1 file changed: 6 ins; 0 del; 2 mod Patch: https://git.openjdk.org/jdk/pull/29239.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/29239/head:pull/29239 PR: https://git.openjdk.org/jdk/pull/29239
