<AWT Dev>  Review Request: 8047336 Read flavormap.properties as resource
petr.pchelko at oracle.com
Thu Jun 19 11:17:41 UTC 2014
Please review the fix for the issue:
The fix is available at:
This is another step in datatransfer modularization work. This part of the work needs a CCC, so I've moved it out to a separate fix. The CCC will be filed once the fix is settled.
Multiple changes are happening here:
1. After http://ccc.us.oracle.com/8005250 the flavormap.properties and AWT.DnD.flavorMapFileURL Toolkit property was removed from the public API. However one mention was forgotten and I'm removing it now, see changes in Toolkit.java
2. For modules we need to move flavormap.properties out of the jre/lib. I'm not sure about the new location. Can I add properties to the java.awt.datatransfer package? Wouldn't they be considered public in this case?
3. The AWT.DnD.flavorMapFileURL Toolkit property cannot be set by the user and it's not used by us. So I'm removing it.
4. As flavormap.properties is not editable by the user any more, I'm changing it's format to get significant simplification of the parsing code.
There's no way left to change the default mappings now, but we have public supported API to create new mappings in the Java code. System property could be added to provide alternative properties location, but I don't think it's required.
The fix was tested on Windows, Linux and Mac with JCK and all regression tests related to datatransfer, dnd and clipboard. The JPRT build succeeds.
A question for the build team: as you see I'm creating an explicit rule for the properties file. The problem's that if I add flavormap.properties to the COPY_PATTERNS, the solaris version is used on Mac for some reason. Is that a bug and is there any way to avoid it?
With best regards. Petr.
More information about the awt-dev