8027030: AWT Multiple JVM DnD Test Failing on Linux (OEL and Ubuntu) and Solaris (Sparc and x64)
authorpchelko
Thu, 24 Oct 2013 19:23:02 +0400
changeset 21271 62d0e22ef687
parent 21270 8a0fc12b81a2
child 21272 aac4dd1cd15d
8027030: AWT Multiple JVM DnD Test Failing on Linux (OEL and Ubuntu) and Solaris (Sparc and x64) Reviewed-by: anthony, serb
jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java
--- a/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java	Thu Oct 24 14:32:07 2013 +0400
+++ b/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java	Thu Oct 24 19:23:02 2013 +0400
@@ -1674,6 +1674,15 @@
                 theObject = translateStream(bais, flavor, format, localeTransferable);
             }
 
+        } else if (flavor.isRepresentationClassRemote()) {
+            try (ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+                 ObjectInputStream ois = new ObjectInputStream(bais))
+            {
+                theObject = RMI.getMarshalledObject(ois.readObject());
+            } catch (Exception e) {
+                throw new IOException(e.getMessage());
+            }
+
             // Target data is Serializable
         } else if (flavor.isRepresentationClassSerializable()) {