<AWT Dev> [9] Review Request: 8037485 Refactor java.awt.datatransfer to eliminate dependency on AWT

Petr Pchelko petr.pchelko at oracle.com
Tue Jul 22 14:04:15 UTC 2014


Hello,

I've updated the fix. The new version is located here:
http://cr.openjdk.java.net/~pchelko/9/8037485/webrev.01/

I've reverted RMI changes as they will be handled separately. 
Also I've changed package names, now the internal part of the datatransfer module is called sun.datatransfer. This allowed to make less renamings and leave sun.awt.datatransfer package as is. 

With best regards. Petr.

On 18 июля 2014 г., at 13:15, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 17/07/2014 12:07, Petr Pchelko wrote:
>> Hello,
>> 
>> Please review the fix for the issue:
>> https://bugs.openjdk.java.net/browse/JDK-8037485
>> The fix is available at:
>> http://cr.openjdk.java.net/~pchelko/9/8037485/webrev.00
>> 
>> 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.
> Mandy and I had a brief discussion with Petr about this. One suggestion is to separate out the changes related to RMI as there are other approaches there. This would also make it a bit easier to review the most important work to factor out the datatransfer API.
> 
> -Alan.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/awt-dev/attachments/20140722/abe608c6/attachment.html>


More information about the awt-dev mailing list