This PR applies @AlanBateman's patch from the JBS issue. -------------
Commit messages: - Hardening Thread::beforeSleep to not be able to throw OOME as per Alan Batemans ThreadSleepEvent.patch Changes: https://git.openjdk.org/jdk/pull/20923/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=20923&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8299419 Stats: 19 lines in 2 files changed: 3 ins; 11 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/20923.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/20923/head:pull/20923 PR: https://git.openjdk.org/jdk/pull/20923