<AWT Dev> Cannot paste large amounts of text

Emil Goicovici emil.goicovici at gmail.com
Tue Sep 18 07:10:17 PDT 2012

Also reported on bugs.sun.com with bug id 7199196.

Using either Oracle JRE 1.7.0_06-b24 or OpenJDK 1.7.0_07 under Ubuntu
12.04 OS, I cannot paste large amounts of
text in java applications. Running the same app with JRE 6 I can paste such
texts without any issue.

After some debugging I've found that the incremental transfer implemented
inside sun.awt.X11.XSelection.getData() method contains one typo that has been
introduced by this changeset:

This changeset was required to ensure that isExecuted() is always performed
after the isDisposed() call , but one typo slipped in here: the second chunk
replaced incrDataGetter.isXXX() calls with validateDataGetter(dataGetter) .
But, as dataGetter is already disposed on line 342, the incremental transfer
operation will fail with an IOException: Owner failed to convert data.

I've attached the proposed patch to this e-mail.

Emil Goicovici
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20120918/c656956c/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XSelection-getData-typo.patch
Type: application/octet-stream
Size: 692 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20120918/c656956c/XSelection-getData-typo.patch 

More information about the awt-dev mailing list