RFR: 8281384: Random chars on paste from Windows clipboard [v9]

Kevin Rushforth kcr at openjdk.org
Mon Mar 31 18:11:43 UTC 2025


On Mon, 31 Mar 2025 17:48:50 GMT, Oliver Schmidtmer <oschmidtmer at openjdk.org> wrote:

>> Windows programs may reuse a clipboard buffer that is larger than the new content. In this case de NUL terminator is not at the end of the buffer, but within it. 
>> The current implementation copys the whole buffer into a text field, including the NUL terminator and the remaining chars.
>> 
>> The JIRA ticket contains a JNA based sample program, which prefills the buffer for demonstrating this issue.
>> If this should be added as a unit test, I'm open for advice how to do that.
>
> Oliver Schmidtmer has updated the pull request incrementally with one additional commit since the last revision:
> 
>   explicit break

Marked as reviewed by kcr (Lead).

-------------

PR Review: https://git.openjdk.org/jfx/pull/1724#pullrequestreview-2730141862


More information about the openjfx-dev mailing list