<AWT Dev>  Review Request: 8037485 Refactor java.awt.datatransfer to eliminate dependency on AWT
petr.pchelko at oracle.com
Thu Jul 17 11:07:11 UTC 2014
Please review the fix for the issue:
The fix is available at:
This fix separates the public datatransfer API from the desktop module. The datatransfer module would contain java.awt.datatransfer and sun.awt.datatransfer packages.
The sun.awt.datatransfer.desktop contains platform-dependent features of the datatransfer system and belongs to the desktop module. So, most of the changes are just package renaming.
DataTransferer class was split into 2 parts:
1. Utilities to work with the DataFlavor is moved to the DataFlavorUtil class. It's just a collection of uility functions and classes
2. Java objects to native representation converters are left in the DataTransferer class and moved to the desktop module. It's needed only with DnD and system clipboard API, so it naturally belong to desktop.
DesktopDatatransferServices was created. This is a collection of services that datatrasfer module could use from desktop if desktop is present. ServiceLoader is used because reflection does not cross module boundaries for non-exported APIs
RMIAccessServices - a collection of services which RMI module might provide to desktop and datatransfer. If RMI module is present we can transfer RMI classes. If not - we cannot.
The fix was tested on all platforms with jtreg and JCK. No new test failures found. Also the fix was tested without the RMI and without the desktop module.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the awt-dev