I backport this to fix this issue in 22. We see it failing there in our CI.
------------- Commit messages: - Backport c2e77e2f17b624e750dea8fd51bbfde99596690e Changes: https://git.openjdk.org/jdk22/pull/95/files Webrev: https://webrevs.openjdk.org/?repo=jdk22&pr=95&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8319128 Stats: 45 lines in 6 files changed: 36 ins; 4 del; 5 mod Patch: https://git.openjdk.org/jdk22/pull/95.diff Fetch: git fetch https://git.openjdk.org/jdk22.git pull/95/head:pull/95 PR: https://git.openjdk.org/jdk22/pull/95