Backport to fix the regression introduced in JDK 22. -------------
Commit messages: - Backport e4389d8dc224419b8c1ee08e9f2dea0f103c6845 Changes: https://git.openjdk.org/jdk22/pull/63/files Webrev: https://webrevs.openjdk.org/?repo=jdk22&pr=63&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8323571 Stats: 357 lines in 4 files changed: 339 ins; 0 del; 18 mod Patch: https://git.openjdk.org/jdk22/pull/63.diff Fetch: git fetch https://git.openjdk.org/jdk22.git pull/63/head:pull/63 PR: https://git.openjdk.org/jdk22/pull/63