Clean backport. Need to backport this since it was introduced with the new test in [JDK-8333542](https://bugs.openjdk.org/browse/JDK-8333542), which has also been backpoted to 23.
------------- Commit messages: - Backport 4e8cbf884ab1eee9c3110712ab62edc706e948ba Changes: https://git.openjdk.org/jdk/pull/19976/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19976&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8335134 Stats: 9 lines in 1 file changed: 8 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19976.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19976/head:pull/19976 PR: https://git.openjdk.org/jdk/pull/19976