Cannot create DataFlavor for array class type, of another mime than serialized.

XMLWordPrintable

    • Type: Bug
    • Resolution: Not an Issue
    • Priority: P4
    • None
    • Affects Version/s: 1.4.0
    • Component/s: client-libs
    • None
    • generic
    • generic

      There is no way how to create DataFlavor for array class type object, with another mime type than application/x-java-serialized-object.

      I guess I already filled a bug, about more convenient constructor allowing to specify representation class also for other mime types like: application/x-java-jvm-local-objectref.

      I used trick which works for non-array classes, i.e.:

      new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType + "; class=java.lang.Object", null);

      but the same tactic doesn't work for array type:
      new DataFlavor(DataFlavor.javaJVMLocalObjectMimeType + "; class=[Ljava.lang.Object;", null)

      where the last semicolon (;) which is necessary to specify the class name for array types is always trimmed in mime type parsing, thus it leads to ClassNotFoundException when constructing such DataFlavor.

            Assignee:
            Alexander Gerasimov (Inactive)
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: