Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4147507

StringSelection plainTextFlavor returns a StringReader

XMLWordPrintable

    • 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

            dmendenhsunw David Mendenhall (Inactive)
            rmandelsunw Ronan Mandel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: