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

DataFlavor incorrectly throws exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P1 P1
    • None
    • 1.2.1
    • client-libs
    • None
    • generic
    • solaris_2.6

      DataFlavor is throwing an exception in a situation where it never did before.
      This is breaking the JavaBeans Activation Framework Standard Extension.

      datsun$ cat df.java
      import java.awt.datatransfer.*;

      public class df {
          public static void main(String[] argv) throws Exception {
              new DataFlavor("text/plain", "Plain Text");
          }
      }
      datsun$ javac df.java
      datsun$ java df
      Exception in thread "main" java.lang.IllegalArgumentException: no representation class specified for:text/plain
              at java.awt.datatransfer.DataFlavor.initialize(DataFlavor.java, Compiled Code)
              at java.awt.datatransfer.DataFlavor.<init>(DataFlavor.java, Compiled Code)
              at df.main(df.java, Compiled Code)
      datsun$ java -version
      java version "1.2.1"
      Classic VM (build JDK-1.2.1-I, green threads, sunwjit)

            Unassigned Unassigned
            bshannon Bill Shannon (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: