JDK-7199196 : Incremental transfer is broken because of a typo
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7,7u6
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: linux_ubuntu
  • CPU: x86
  • Submitted: 2012-09-18
  • Updated: 2013-10-17
  • Resolved: 2013-10-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8 b112Fixed
Related Reports
Relates :  
Description
FULL PRODUCT VERSION :
java version "1.7.0_06"
Java(TM) SE Runtime Environment (build 1.7.0_06-b24)
Java HotSpot(TM) 64-Bit Server VM (build 23.2-b09, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Linux 3.2.0-30-generic #48-Ubuntu SMP Fri Aug 24 16:52:48 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux


A DESCRIPTION OF THE PROBLEM :
Using JRE 1.7.0_06-b24 under Ubuntu 12.04 OS, I cannot paste large amounts of
text in java applications. However, I am able to paste small amounts of text (that don't require incremental transfer - see the XSelection.getData() method).  Running the same app with JRE 6 I can paste such
texts without any issue.

REGRESSION.  Last worked in version 6u31

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- open a 5000+ lines file with gedit or other text editor under Linux;
- select all the lines and copy them to the system clipboard;
- try to paste it on a simple Swing application ( containing a JEditorPane component etc);

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The entire text from system clipboard should be pasted inside the Swing component.
ACTUAL -
Nothing is pasted on the swing component.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
No error message, but an IOException: Owner failed to convert data exception is thrown internally and thus abruptly halting the normal content retrieving from the system clipboard.

REPRODUCIBILITY :
This bug can be reproduced always.

CUSTOMER SUBMITTED WORKAROUND :
Actually this bug is caused by a small typo inside sun.awt.X11.XSelection class, method getData() , line 378 (OpenJDK source code). It should be:

validate(incrDataGetter);

instead of what is currently on this line

validate(dataGetter);

This typo slipped in during revision 6fd2d28e66cd made on this class. This changeset clearly shows incrDataGetter variable was used on the past and the change was done to ensure that .isExecuted() gets called only after the .isDisposed() call.

Comments
isn't a regression from jdk8 pov
02-10-2013

EVALUATION Should be fixed.
20-09-2012