[OpenJDK 2D-Dev] RFR: 8035302: Eliminate dependency on sun.nio.cs from AWT and Motif code
Alan.Bateman at oracle.com
Thu May 28 09:27:06 UTC 2015
On 28/05/2015 10:10, Volker Simonis wrote:
> Yes, but as I wrote, there is a hard dependency from some of the
> sun.font classes to some non-standard charsets:
> sun.font.X11GB2312 -> sun.nio.cs.EUC_CN
> sun.font.X11GBK -> sun.nio.cs.GBK
> sun.font.X11KSC5601 -> sun.nio.cs.EUC_KR
> If I decide that I don't want to put EUC_CN in the set of standard
> charsets on a specific OS, I won't be able to build. I have opened
> https://bugs.openjdk.java.net/browse/JDK-8081332 for this issue and
> have an easy fix out for review which just adds the corresponding
> stdcs-aix file on AIX.
> But still I think it is bad that compiling the sun.font.* package
> which is part of the 'java.desktop' module requires the manual
> maintenance of an OS-dependent 'stdcs-<os>' file. I think it would be
> much better if either all the charsets referenced by 'sun.font.*' are
> in the standard charset by default or the other way round if we only
> reference standard charsets from 'sun.font.*'.
Footprint is a concern for java.base so this is why it only contains the
6 standard charsets and any additional charsets that are needed to run
in supported configurations. For the AIX port then the size of java.base
might not be a concern and you might decide to put most or all of the
extended charsets into java.base.
It would be nice if sun.font.* did not directly depend on sun.nio.cs.*.
One of Phil's initial patches attempted to address this but at the cost
of copying charset code into the java.desktop module. Some of us have
maintenance concerns with doing that. Our main goal wasn't to address
this long standing dependency, instead it was to address the dependency
on classes in the provider module. Maybe it's time to re-visit the
dependency on sun.nio.cs too.
More information about the 2d-dev