On Mon, 14 Apr 2025 17:19:19 GMT, Matthias Bläsing <mblaes...@openjdk.org> wrote:
>> - 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. > > Matthias Bläsing has updated the pull request incrementally with one > additional commit since the last revision: > > Adress review comments: Update copyright years and fix whitespace in if > condition It would be great to get a review on this. While the issues are "only" P-3 and P-4, the issues leave a very bad image for java on windows. Copy-and-Paste should just work and not fail randomly and maybe even crash the VM. The issue is serious enough for NetBeans, that it will ship a java agent to work around this problem, but that will not implement this change here and is clearly not an option in the long run and thus this needs a real fix. ------------- PR Comment: https://git.openjdk.org/jdk/pull/24614#issuecomment-2855480128