SwingDnD.DnDTransferable needs to take into account the representation class else this happens:
java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to java.io.InputStream
at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1372)
at sun.lwawt.macosx.CDataTransferer.translateTransferable(CDataTransferer.java:131)
at sun.awt.datatransfer.DataTransferer$6.run(DataTransferer.java:2380)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
...
See http://mail.openjdk.java.net/pipermail/openjfx-dev/2014-March/012977.html
java.lang.ClassCastException: java.nio.HeapByteBuffer cannot be cast to java.io.InputStream
at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1372)
at sun.lwawt.macosx.CDataTransferer.translateTransferable(CDataTransferer.java:131)
at sun.awt.datatransfer.DataTransferer$6.run(DataTransferer.java:2380)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744)
...
See http://mail.openjdk.java.net/pipermail/openjfx-dev/2014-March/012977.html
- relates to
-
JDK-8097094 IllegalArgumentException in DataFlavor when running Scene Builder Kit in Swing application
- Resolved