[OpenJDK 2D-Dev] RFR: 8035302: Eliminate dependency on sun.nio.cs from AWT and Motif code
volker.simonis at gmail.com
Wed May 27 17:01:43 UTC 2015
sorry, but as usually, I'm a little late to the game:)
This change, along with change "8073152: Update
Standard/ExtendedCharsets to work with module system" causes build
failures on AIX.
It took me some time to dig trough the build system, but I think that
I at least have a weak understanding of what's going on now:
So this change removes the dependencies of the 'java.desktop' module
on the 'jdk.charsets' module or to be more precise, it removes
'java.desktop's dependency on sun.nio.cs.ext.
But unfortunately this only works on the current Oracle-supported
platforms. The following dependencies still exist:
sun.font.X11GB2312 -> sun.nio.cs.EUC_CN
sun.font.X11GBK -> sun.nio.cs.GBK
sun.font.X11KSC5601 -> sun.nio.cs.EUC_KR
Before this change, the classes X11GB2312, X11GBK and X11KSC5601 were
located in sun.awt.motif and they imported both "sun.nio.cs.*" and
"sun.nio.cs.ext.*". After this change, they only import
"sun.nio.cs.*", so if the required character sets aren’t located in
the standard charsets package but in the extended one, this won't work
On the Oracle platforms this still works because both Linux and
Solaris put the corresponding charsets (i.e. X11GB2312, X11GBK and
X11KSC5601) into the standard charsets package sun.nio.cs by using the
two configuration files jdk/make/data/charsetmapping/stdcs-linux and
jdk/make/data/charsetmapping/stdcs-solaris. On MacOS X the build still
works because the sun.font.* classes are excluded from the
'java.desktop' module altogether (see java.desktop_EXCLUDE_FILES in
On AIX the build fails because there the corresponding charsets (i.e.
X11GB2312, X11GBK and X11KSC5601) are in the extended charsets package
by default and there's no jdk/make/data/charsetmapping/stdcs-aix
configuration files which remaps them to "sun.nio.cs.*".
I can easily fix this by introducing a new
jdk/make/data/charsetmapping/stdcs-aix configuration file which maps
X11GB2312, X11GBK and X11KSC5601 to "sun.nio.cs.*" (and I'll do that
with a follow-up change request to fix the build as soon as possible).
But still the question remains if this is the "right way" to solve
this problem? I.e. if some sun.font.XXX classes depend on some
character sets being in "sun.nio.cs.*", shouldn't this be ensured
automatically without the need of keeping some per-platform
configuration files up to date?
And what is actually the exact semantics of the "stdcs-solaris" and
"stdcs-linux" files? For example it seems strange to me that
"JIS_X_0212_Solaris" is made a standard charset on Linux. As far as I
can see, it is enough to move the three charsets EUC_CN, GBK and
EUC_KR to "sun.nio.cs.*" in order to satisfy the new build
So maybe we should just declare this correctly right in the
"jdk/make/data/charsetmapping/charsets" file or otherwise have a
special "stdcs-REQUIRED" file for these three charsets and leave the
platform dependent files for _real_ platform specific customizations.
What do you think?
Thank you and best regards,
On Thu, Apr 9, 2015 at 10:26 PM, Phil Race <philip.race at oracle.com> wrote:
> Old "notes to self" from an earlier revision. I'll delete before pushing.
> On 04/09/2015 12:25 PM, Mandy Chung wrote:
> On 3/25/15 3:48 PM, Phil Race wrote:
> Updated webrev http://cr.openjdk.java.net/~prr/8035302.2/
> + jclass = "JIS0201"; // CHECK
> + jclass = "MS950_HKSCS_XP"; // CHECK
> What is the CHECK comment? Otherwise, looks okay. Thank you for
> removing java.desktop dependency to jdk.charsets.
More information about the 2d-dev