harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deven You <devyo...@gmail.com>
Subject Re: [classlib][luni] String.toLowerCase/toUpperCase incorrect for supplementary characters (HARMONY-6649)
Date Mon, 27 Sep 2010 02:26:38 GMT
I have tested this patch on my local machine, Ubuntu10.04 x86. It works
well.

2010/9/27 Tim Ellison <t.p.ellison@gmail.com>

> On 24/Sep/2010 17:51, Deven You wrote:
> > Here is the result of Specjbb
>
> I don't have a copy of Specjbb to try, so sorry it broke that.  I think
> I can set up a harmony unit test to emulate the problem here once we
> have an acceptable solution.
>
> Snipped stack trace follows...
> > java.util.Locale (initialization failure)
> > Caused by: java.lang.NullPointerException
> > at com.ibm.icu.util.ULocale.getName(ULocale.java:827)
> > at com.ibm.icu.util.ULocale.<init>(ULocale.java:480)
> > at java.util.Locale.<init>(Locale.java:234)
> > at com.ibm.icu.util.ULocale.<clinit>(ULocale.java:109)
> > at com.ibm.icu.util.TimeZone.getTimeZone(TimeZone.java:617)
> > at java.util.SimpleTimeZone.getICUTimeZone(SimpleTimeZone.java:48)
> > at java.util.SimpleTimeZone.<init>(SimpleTimeZone.java:110)
> > at java.util.TimeZone.<clinit>(TimeZone.java:91)
>
> > I have marked several important stack invocations as red and bold.
>
> Sorry, the red and bold were lost for me, however, I've gone through and
> trimmed down the stack aggressively to show the key parts.
>
> > From above stack trace, Class load process will invoke security
> > methods which will use TimeZone and TimeZone will finally depend on
> > ULocale.
> >
> > I think if our harmony apis need Locale TimeZone info, it always depends
> on
> > icu's ULocale, TimeZone and etc. It can not be avoided during Java
> startup.
>
> Well in this case, yes we do need a TimeZone as part of the certificate
> decoding, but in general we might not need Locale info, so I'm reluctant
> to force a j.u.Locale load too early e.g. by a reference from String.
>
> The 'correct' fix is to change the ICU code to load Locale earlier, I
> guess they don't expect to be early on the boot sequence.  Given we
> can't/don't want to modify ICU for our needs here, I've added (r1001490)
> a reference to Locale during the TimeZone definition to force the load.
>  Please can you check that fixes the problem you see on Specjbb?
>
> There may be other cases that need us to initialize ICU, and I'll look
> for them.  If you have any better ideas of how to get the ordering right
> please say.
>
> Regards,
> Tim
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message