[OpenJDK 2D-Dev] RFR: 8035302: Eliminate dependency on sun.nio.cs from AWT and Motif code
Phil Race
philip.race at oracle.com
Wed May 27 17:14:20 UTC 2015
Hi Volker,
Sorry for breaking AIX but I think it may be more related to these bugs
https://bugs.openjdk.java.net/browse/JDK-8073152
https://bugs.openjdk.java.net/browse/JDK-8073893
8035302 then takes advantage of these but did not create/update
the per-platform configuration. I think the variance is
in part about putting into base only what has to be there
to support boot-strapping and known dependencies whilst
otherwise keeping base as small as possible.
-phil.
On 05/27/2015 10:01 AM, Volker Simonis wrote:
> Hi everybody,
>
> 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
> any more.
>
> 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
> make/CompileJavaModules.gmk).
>
> 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
> dependencies.
>
> 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,
> Volker
>
>
> 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.
>>
>> -phil.
>>
>>
>> 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/
>>
>> sun/font/XMap.java
>> + 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.
>>
>>
>> Mandy
>>
>>
More information about the 2d-dev
mailing list