changeset 1465:953caf041bef

2009-04-07 Omair Majid <omajid@redhat.com> * patches/icedtea-dnd-filelists.patch: New patch. Fix drag and drop behaviour when dragging a file list between JVMs (S5079469). Backported from OpenJDK. * Makefile.am (ICEDTEA_PATCHES): Apply the above. * HACKING: Document the above.
author Omair Majid <omajid@redhat.com>
date Tue, 07 Apr 2009 10:28:20 -0400
parents 976903c2e02e
children 97ad7002bc2e
files ChangeLog HACKING Makefile.am patches/icedtea-dnd-filelists.patch
diffstat 4 files changed, 29 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Apr 06 16:50:53 2009 -0400
+++ b/ChangeLog	Tue Apr 07 10:28:20 2009 -0400
@@ -1,3 +1,11 @@
+2009-04-07  Omair Majid  <omajid@redhat.com>
+
+	* patches/icedtea-dnd-filelists.patch: New patch. Fix drag and drop
+	behaviour when dragging a file list between JVMs (S5079469). Backported
+	from OpenJDK.
+	* Makefile.am (ICEDTEA_PATCHES): Apply the above.
+	* HACKING: Document the above.
+
 2009-04-06  Omair Majid  <omajid@redhat.com>
 
 	* patches/icedtea-jtreg-jrunscript.patch: New patch. Replaces 
--- a/HACKING	Mon Apr 06 16:50:53 2009 -0400
+++ b/HACKING	Tue Apr 07 10:28:20 2009 -0400
@@ -104,6 +104,7 @@
 * icedtea-6712835-ifnode.patch: Fix infinite loop in PhaseIterGVN::transform.
 * icedtea-timezone.patch : Makes java only look for time zone information in /etc/sysconfig/clock if /etc/localtime is not found (fix 
   for rh-489586)
+* icedtea-dnd-filelists.patch: Fix drag and drop behaviour when dragging a file list between JVMs (S5079469). Backported from OpenJDK.
 
 The following patches are only applied to OpenJDK in IcedTea:
 
--- a/Makefile.am	Mon Apr 06 16:50:53 2009 -0400
+++ b/Makefile.am	Tue Apr 07 10:28:20 2009 -0400
@@ -693,6 +693,7 @@
 	patches/icedtea-jtreg-printjob-edgetest-manual.patch \
 	patches/icedtea-jtreg-jrunscript.patch \
 	patches/icedtea-network-unreachable.patch \
+	patches/icedtea-dnd-filelists.patch \
 	$(DISTRIBUTION_PATCHES)
 
 stamps/extract.stamp: stamps/download.stamp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/icedtea-dnd-filelists.patch	Tue Apr 07 10:28:20 2009 -0400
@@ -0,0 +1,19 @@
+--- openjdk/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java.orig	2009-04-06 16:17:44.000000000 -0400
++++ openjdk/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java	2009-04-06 16:33:42.000000000 -0400
+@@ -1327,12 +1327,11 @@
+                 throw new IOException(pae.getMessage());
+             }
+ 
+-            for (String fileName: fileList) {
+-                byte[] bytes = fileName.getBytes();
+-                bos.write(bytes, 0, bytes.length);
+-                bos.write(0);
++            for (int i = 0; i < fileList.size(); i++) {
++                 byte[] bytes = fileList.get(i).getBytes();
++                 if (i != 0) bos.write(0);
++                 bos.write(bytes, 0, bytes.length);
+             }
+-            bos.write(0);
+ 
+         // Source data is an InputStream. For arbitrary flavors, just grab the
+         // bytes and dump them into a byte array. For text flavors, decode back