-
Bug
-
Resolution: Fixed
-
P4
-
1.1.7, 1.2.0
-
kestrel
-
generic, x86
-
generic, windows_nt
Name: rm29839 Date: 06/10/98
The specification for DataFlavor.plainTextFlavor says that
the representation class is input stream.
However, the object returned from a StringSelection
using plainTextFlavor is a StringReader. This leads to all sorts
of class cast exceptions when performing a D&D.
java.lang.ClassCastException: java.io.StringReader
at sun.awt.windows.WDragSourceContextPeer.convertData(WDragSourc
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(WToolkit.java:123)
at java.lang.Thread.run(Thread.java:490)
See class java.awt.DataTransfer.StringSelection
public synchronized Object getTransferData(DataFlavor flavor)
line 68.
Perhaps you need to two different flavors.
(Review ID: 33418)
======================================================================
This is not a DnD bug., it belongs in classes_awt.
larry.cable@Eng 1998-06-10
- duplicates
-
JDK-4209435 StringSelection does not conform to DataFlavor.plainTextFlavor docs
- Closed
-
JDK-4221139 DataFlavor.plainTextFlavor return StringReader
- Closed
- relates to
-
JDK-4289735 Unification of Clipboard and Drag & Drop Data Transfer
- Resolved
-
JDK-4283047 getReaderForText() throws IllegalArgumentException for PlainText dataflavor.
- Closed