- Introduce a lock into WClipboard that protects the code between openClipboard/closeClipboard invocations. The native side does not allow to open the clipboard multiple times or share the opened clipboard between multiple threads.
- Remove of need to call openClipboard/closeClipboard from getClipboardFormats by using the win32 call GetUpdatedClipboardFormats - Prevent a race-condition by not registering the connection between java and native side of clipboard multiple time, but just at construction time. ------------- Commit messages: - 8353950: Ensure windows clipboard is not accessed concurrently - 8353950: Ensure JDK does not crash when running reproducer Changes: https://git.openjdk.org/jdk/pull/24614/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24614&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8353950 Stats: 92 lines in 3 files changed: 46 ins; 24 del; 22 mod Patch: https://git.openjdk.org/jdk/pull/24614.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/24614/head:pull/24614 PR: https://git.openjdk.org/jdk/pull/24614