Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 2094 invoked from network); 26 Sep 2010 07:28:38 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 26 Sep 2010 07:28:38 -0000 Received: (qmail 82427 invoked by uid 500); 26 Sep 2010 07:28:38 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 81905 invoked by uid 500); 26 Sep 2010 07:28:34 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 81896 invoked by uid 99); 26 Sep 2010 07:28:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Sep 2010 07:28:33 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of devyoudw@gmail.com designates 209.85.213.177 as permitted sender) Received: from [209.85.213.177] (HELO mail-yx0-f177.google.com) (209.85.213.177) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Sep 2010 07:28:29 +0000 Received: by yxm34 with SMTP id 34so1752004yxm.36 for ; Sun, 26 Sep 2010 00:28:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=Le1X5Nbx8sk2Yx65wx0Wi/ox/25ql8heO18hUnPcAFo=; b=v+XxEzwk6f8kabQ15BctkNQcA1jGiqFN4O/xJtHLhJq/TxM3Tp5vJQafCZ6mO8AZzP h06XrDPi10QUfSSyBd8XpTJDIxhE2bDHOMG0BizuyEeLSZ6GS9jTtqvtcmYhaIKeJcYM STP4u/iTLd1pMEm3jy7AxzHFoEL+vwwysojRc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=nAk/9bTykXKcU14+5rp4I29CmjncJUQ4r6FJyMUtW03UpBra/xmnrqXHVJbfamj0ce Y1aBvQraQgVqwAAoZG+vO/j9OPZs9/4kHc5T5oCZ5C2aPQIgKiIVFNAITWzuuKzc2mbA Yc4CaJFLHaiXNOjzEJAicqQ6tzAOxGn+JzSZo= MIME-Version: 1.0 Received: by 10.90.56.11 with SMTP id e11mr4006129aga.162.1285486087866; Sun, 26 Sep 2010 00:28:07 -0700 (PDT) Received: by 10.100.211.7 with HTTP; Sun, 26 Sep 2010 00:28:07 -0700 (PDT) In-Reply-To: References: <16508996.357041285200633873.JavaMail.jira@thor> <4C9ABC65.6000202@gmail.com> <4C9C0E0B.6080703@gmail.com> <4C9C24C1.6030809@gmail.com> <4C9C31BD.2010504@gmail.com> <4C9C3BFC.2090107@gmail.com> <4C9C44ED.6040506@gmail.com> Date: Sun, 26 Sep 2010 15:28:07 +0800 Message-ID: Subject: Re: [classlib][luni] String.toLowerCase/toUpperCase incorrect for supplementary characters (HARMONY-6649) From: Deven You To: dev@harmony.apache.org Content-Type: multipart/mixed; boundary=00163616430fa188210491248d97 --00163616430fa188210491248d97 Content-Type: multipart/alternative; boundary=00163616430fa188130491248d95 --00163616430fa188130491248d95 Content-Type: text/plain; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable I think below patch can works well, but it is ugly Please verify it. Thanks a lot! 2010/9/24 Mohanraj Loganathan > Hi Deven, > > I followed your steps 1 & 2. But java -version crashes with Harmony5.0 > > Attaching the out file of java -version. > > Thanks and Regards, > Mohan > > > 2010/9/24 Deven You : > > I have saw the error before, and I have some investigation of it. I thi= nk > > the root cause is the commit change the class load order. Before this > > commit, Locale class will be loaded before ULocale class And after this > > commit, ULocale is loaded before Locale. > > > > The direct cause is CharsetProviderImpl no longer use String.toUpperCas= e, > > instead it uses its own toUpperCase. And String.toUpperCase calls > > String.toUpperCase(Locale), this ensure Locale class will be loaded > before > > ULocale. However CharsetProviderImpl own toUpperCase uses no Locale, so > it > > causes Locale class loaded after ULocale. > > > > To solve this problem, a work around could simply be below: > > 1.Add a Locale static field in String: > > private static Locale defaulLocale =3D new Locale.getDefaultLocale(); > > ... > > 2. Change the String.toUpperCase() from calling > > toUpperCase(Locale.getDefaultLocale()) to toUpperCase(defaultLocale) > > > > above change could solve the NullPointerException mentioned by Mohan, b= ut > I > > am not sure if it is a good design. > > > > Caused by: java.lang.NullPointerException > > at com.ibm.icu.util.ULocale.getName(ULocale.java:827) > > at com.ibm.icu.util.ULocale.(ULocale.java:480) > > at java.util.Locale.(Locale.java:228) > > at java.util.Locale.(Locale.java:201) > > at java.util.Locale.(Locale.java:51) > > at com.ibm.icu.util.ULocale.(ULocale.java:109) > > > > > > > > > > > > 2010/9/24 Mohanraj Loganathan > > > >> On loading junit.jar[2] i get initialization exception[3]. This > >> exception disappears if i revert the patch committed for > >> (HARMONY-6649) toUpper/toLowerCase. > >> > >> Make sure your junit.jar contains the signature files[1]. (use the > >> junit.jar(version 3.8.2) bundled with eclipse). So with HARMONY-6649 > >> commit, I am not able to load the jar file if it's manifest contains > >> any signature related files. Any thought on this? > >> > >> > >> [1] jar -tvf junit.jar > >> 9714 Thu Aug 07 12:04:14 GMT+05:30 2008 META-INF/MANIFEST.MF > >> 9791 Thu Aug 07 12:04:14 GMT+05:30 2008 META-INF/ECLIPSE.SF > >> 3487 Thu Aug 07 12:04:14 GMT+05:30 2008 META-INF/ECLIPSE.RSA > >> 0 Fri Mar 03 15:22:26 GMT+05:30 2006 META-INF/ > >> 76 Thu Aug 07 12:04:08 GMT+05:30 2008 META-INF/eclipse.inf > >> 0 Fri Mar 03 15:22:10 GMT+05:30 2006 junit/ > >> 0 Fri Mar 03 15:22:26 GMT+05:30 2006 junit3.8.2/ > >> 0 Fri Mar 03 15:22:24 GMT+05:30 2006 junit/awtui/ > >> ............ > >> > >> [2] run command : java -cp junit.jar junit.textui.TestRunner > >> > >> [3] Exception: > >> Uncaught exception in main: > >> java.lang.ExceptionInInitializerError > >> at com.ibm.icu.util.ULocale.(ULocale.java:109) > >> at > >> com.ibm.icu.impl.ICUResourceBundle.instantiateBundle(ICUResourceBundl > >> e.java:810) > >> at > >> com.ibm.icu.impl.ICUResourceBundle.getBundleInstance(ICUResourceBundl > >> e.java:801) > >> at > >> com.ibm.icu.util.UResourceBundle.getRootType(UResourceBundle.java:489 > >> ) > >> at > >> com.ibm.icu.util.UResourceBundle.instantiateBundle(UResourceBundle.ja > >> va:536) > >> at > >> com.ibm.icu.util.UResourceBundle.getBundleInstance(UResourceBundle.ja > >> va:144) > >> at > >> com.ibm.icu.util.UResourceBundle.getBundleInstance(UResourceBundle.ja > >> va:124) > >> at com.ibm.icu.impl.ZoneMeta.getSystemTimeZone(ZoneMeta.java:50= 9) > >> at com.ibm.icu.util.TimeZone.getTimeZone(TimeZone.java:617) > >> at com.ibm.icu.util.TimeZone.getTimeZone(TimeZone.java:587) > >> at java.util.SimpleTimeZone$1.run(SimpleTimeZone.java:50) > >> at java.util.SimpleTimeZone$1.run(SimpleTimeZone.java:1) > >> at > >> java.security.AccessController.doPrivilegedImpl(AccessController.java > >> :171) > >> at > >> java.security.AccessController.doPrivileged(AccessController.java:53) > >> > >> at > java.util.SimpleTimeZone.getICUTimeZone(SimpleTimeZone.java:48) > >> at java.util.SimpleTimeZone.(SimpleTimeZone.java:110) > >> at java.util.TimeZone.(TimeZone.java:91) > >> at > >> org.apache.harmony.security.asn1.ASN1Time.getDecodedObject(ASN1Time.j > >> ava:51) > >> at > >> org.apache.harmony.security.asn1.ASN1UTCTime.decode(ASN1UTCTime.java: > >> 96) > >> at > >> org.apache.harmony.security.asn1.ASN1Choice.decode(ASN1Choice.java:32 > >> 0) > >> at > >> org.apache.harmony.security.asn1.BerInputStream.readSequence(BerInput > >> Stream.java:665) > >> at > >> org.apache.harmony.security.asn1.DerInputStream.readSequence(DerInput > >> Stream.java:125) > >> at > >> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.jav > >> a:48) > >> at > >> org.apache.harmony.security.asn1.BerInputStream.readSequence(BerInput > >> Stream.java:665) > >> at > >> org.apache.harmony.security.asn1.DerInputStream.readSequence(DerInput > >> Stream.java:125) > >> at > >> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.jav > >> a:48) > >> at > >> org.apache.harmony.security.asn1.BerInputStream.readSequence(BerInput > >> Stream.java:665) > >> at > >> org.apache.harmony.security.asn1.DerInputStream.readSequence(DerInput > >> Stream.java:125) > >> at > >> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.jav > >> a:48) > >> at > >> org.apache.harmony.security.asn1.BerInputStream.decodeValueCollection > >> (BerInputStream.java:755) > >> at > >> org.apache.harmony.security.asn1.BerInputStream.readSetOf(BerInputStr > >> eam.java:733) > >> at > >> org.apache.harmony.security.asn1.DerInputStream.readSetOf(DerInputStr > >> eam.java:138) > >> at > >> org.apache.harmony.security.asn1.ASN1SetOf.decode(ASN1SetOf.java:48) > >> at > >> org.apache.harmony.security.asn1.ASN1Implicit.decode(ASN1Implicit.jav > >> a:140) > >> at > >> org.apache.harmony.security.asn1.BerInputStream.readSequence(BerInput > >> Stream.java:665) > >> at > >> org.apache.harmony.security.asn1.DerInputStream.readSequence(DerInput > >> Stream.java:125) > >> at > >> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.jav > >> a:48) > >> at > >> org.apache.harmony.security.asn1.ASN1Type.decode(ASN1Type.java:97) > >> at > >> org.apache.harmony.security.pkcs7.ContentInfo$1.getDecodedObject(Cont > >> entInfo.java:153) > >> at > >> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.jav > >> a:53) > >> at > >> org.apache.harmony.security.utils.JarUtils.verifySignature(JarUtils.j > >> ava:73) > >> at > java.util.jar.JarVerifier.verifyCertificate(JarVerifier.java:296) > >> at > java.util.jar.JarVerifier.readCertificates(JarVerifier.java:265) > >> at java.util.jar.JarFile.getInputStream(JarFile.java:392) > >> at > >> java.net.URLClassLoader$URLJarHandler.createClass(URLClassLoader.java > >> :402) > >> at > >> java.net.URLClassLoader$URLJarHandler.findClass(URLClassLoader.java:3 > >> 71) > >> at > java.net.URLClassLoader.findClassImpl(URLClassLoader.java:1209) > >> at java.net.URLClassLoader$4.run(URLClassLoader.java:901) > >> at java.net.URLClassLoader$4.run(URLClassLoader.java:1) > >> at > >> java.security.AccessController.doPrivilegedImpl(AccessController.java > >> :171) > >> at > >> java.security.AccessController.doPrivileged(AccessController.java:64) > >> > >> at java.net.URLClassLoader.findClass(URLClassLoader.java:903) > >> at java.lang.ClassLoader.loadClass(ClassLoader.java:488) > >> at > >> java.lang.ClassLoader$SystemClassLoader.loadClass(ClassLoader.java:87 > >> 0) > >> at java.lang.ClassLoader.loadClass(ClassLoader.java:267) > >> Caused by: java.lang.NullPointerException > >> at com.ibm.icu.util.ULocale.getName(ULocale.java:827) > >> at com.ibm.icu.util.ULocale.(ULocale.java:480) > >> at java.util.Locale.(Locale.java:228) > >> at java.util.Locale.(Locale.java:201) > >> at java.util.Locale.(Locale.java:51) > >> at com.ibm.icu.util.ULocale.(ULocale.java:109) > >> ... 54 more > >> FAILED to invoke JVM. > >> > >> > >> > >> > >> > >> > >> On Fri, Sep 24, 2010 at 11:57 AM, Tim Ellison > >> wrote: > >> > On 24/Sep/2010 06:58, Robert Muir wrote: > >> >> On Fri, Sep 24, 2010 at 1:49 AM, Tim Ellison > >> wrote: > >> >> > >> >>> System.out.println(new File("=F3.txt").hashCode()); > >> >>> System.out.println(new File("=F2.txt").hashCode()); > >> >>> > >> >>> prints out > >> >>> > >> >>> 889962580 > >> >>> 890776533 > >> >>> > >> >>> on both Harmony and the RI. > >> >>> > >> >>> > >> >> but perhaps this is just a bug in the RI? > >> >> according to the link: > >> >> > >> > http://download.oracle.com/javase/6/docs/api/java/io/File.html#hashCode%2= 8%29 > >> >> < > >> > http://download.oracle.com/javase/6/docs/api/java/io/File.html#hashCode%2= 8%29 > >> >Because > >> >> equality of abstract pathnames is inherently system-dependent, so i= s > the > >> >> computation of their hash codes. > >> >> > >> >> Is it a problem that "windows equals" is inconsistent with hashCode > >> here? I > >> >> admit these are corner cases. > >> > > >> > No, I don't think it is a problem. I was reviewing the invokers of > >> > toLowerCase() and was confused by the wording in the spec. I'm happ= y > >> > that we should simply lowercase it in a locale independent way, and > >> > don't need to do a "windows equals" implementation. > >> > > >> > Regards, > >> > Tim > >> > > >> > >> > >> > >> -- > >> Mohan > >> > > > > > > -- > Mohan > --00163616430fa188130491248d95 Content-Type: text/html; charset=ISO-8859-7 Content-Transfer-Encoding: quoted-printable I think below patch can works well, but it is ugly


<= br>
Please verify it. Thanks a lot!
2010/9/24 Mohanraj Loganathan <mohanraj.l@gmail.com>
Hi Deven,

I followed your steps 1 & 2. But java -version crashes with Harmony5.0<= br>
Attaching the out file of java -version.

Thanks and Regards,
Mohan


2010/9/24 Deven You <devyoudw@gmai= l.com>:
> I have saw the error before, and I h= ave some investigation of it. I think
> the root cause is the commit change the class load order. Before this<= br> > commit, Locale class will be loaded before ULocale class And after thi= s
> commit, ULocale is loaded before Locale.
>
> The direct cause is CharsetProviderImpl no longer use String.toUpperCa= se,
> instead it uses its own toUpperCase. =A0And String.toUpperCase calls > String.toUpperCase(Locale), this ensure Locale class will be loaded be= fore
> ULocale. However CharsetProviderImpl own toUpperCase uses no Locale, s= o it
> causes Locale class loaded after ULocale.
>
> To solve this problem, a work around could simply be below:
> 1.Add a Locale static field in String:
> private static Locale defaulLocale =3D new Locale.getDefaultLocale();<= br> > ...
> 2. Change the String.toUpperCase() from calling
> toUpperCase(Locale.getDefaultLocale()) to toUpperCase(defaultLocale) >
> above change could solve the NullPointerException mentioned by Mohan, = but I
> am not sure if it is a good design.
>
> Caused by: java.lang.NullPointerException
> =A0 =A0 =A0 at com.ibm.icu.util.ULocale.getName(ULocale.java:827)
> =A0 =A0 =A0 at com.ibm.icu.util.ULocale.<init>(ULocale.java:480)=
> =A0 =A0 =A0 at java.util.Locale.<init>(Locale.java:228)
> =A0 =A0 =A0 at java.util.Locale.<init>(Locale.java:201)
> =A0 =A0 =A0 at java.util.Locale.<clinit>(Locale.java:51)
> =A0 =A0 =A0 at com.ibm.icu.util.ULocale.<clinit>(ULocale.java:10= 9)
>
>
>
>
>
> 2010/9/24 Mohanraj Loganathan <mohanraj.l@gmail.com>
>
>> On loading junit.jar[2] i get initialization exception[3]. This >> exception disappears if i revert the patch committed for
>> (HARMONY-6649) toUpper/toLowerCase.
>>
>> Make sure your junit.jar contains the signature files[1]. (use the=
>> junit.jar(version 3.8.2) bundled with eclipse). =A0So with HARMONY= -6649
>> commit, I am not able to load the jar file if it's manifest co= ntains
>> any signature related files. Any thought on this?
>>
>>
>> [1] jar -tvf junit.jar
>> =A09714 Thu Aug 07 12:04:14 GMT+05:30 2008 META-INF/MANIFEST.MF >> =A09791 Thu Aug 07 12:04:14 GMT+05:30 2008 META-INF/ECLIPSE.SF
>> =A03487 Thu Aug 07 12:04:14 GMT+05:30 2008 META-INF/ECLIPSE.RSA >> =A0 =A0 0 Fri Mar 03 15:22:26 GMT+05:30 2006 META-INF/
>> =A0 =A076 Thu Aug 07 12:04:08 GMT+05:30 2008 META-INF/eclipse.inf<= br> >> =A0 =A0 0 Fri Mar 03 15:22:10 GMT+05:30 2006 junit/
>> =A0 =A0 0 Fri Mar 03 15:22:26 GMT+05:30 2006 junit3.8.2/
>> =A0 =A0 0 Fri Mar 03 15:22:24 GMT+05:30 2006 junit/awtui/
>> =A0 =A0 =A0............
>>
>> [2] run command : java -cp junit.jar junit.textui.TestRunner
>>
>> [3] Exception:
>> Uncaught exception in main:
>> java.lang.ExceptionInInitializerError
>> =A0 =A0 =A0 =A0at com.ibm.icu.util.ULocale.<clinit>(ULocale.= java:109)
>> =A0 =A0 =A0 =A0at
>> com.ibm.icu.impl.ICUResourceBundle.instantiateBundle(ICUResourceBu= ndl
>> e.java:810)
>> =A0 =A0 =A0 =A0at
>> com.ibm.icu.impl.ICUResourceBundle.getBundleInstance(ICUResourceBu= ndl
>> e.java:801)
>> =A0 =A0 =A0 =A0at
>> com.ibm.icu.util.UResourceBundle.getRootType(UResourceBundle.java:= 489
>> )
>> =A0 =A0 =A0 =A0at
>> com.ibm.icu.util.UResourceBundle.instantiateBundle(UResourceBundle= .ja
>> va:536)
>> =A0 =A0 =A0 =A0at
>> com.ibm.icu.util.UResourceBundle.getBundleInstance(UResourceBundle= .ja
>> va:144)
>> =A0 =A0 =A0 =A0at
>> com.ibm.icu.util.UResourceBundle.getBundleInstance(UResourceBundle= .ja
>> va:124)
>> =A0 =A0 =A0 =A0at com.ibm.icu.impl.ZoneMeta.getSystemTimeZone(Zone= Meta.java:509)
>> =A0 =A0 =A0 =A0at com.ibm.icu.util.TimeZone.getTimeZone(TimeZone.j= ava:617)
>> =A0 =A0 =A0 =A0at com.ibm.icu.util.TimeZone.getTimeZone(TimeZone.j= ava:587)
>> =A0 =A0 =A0 =A0at java.util.SimpleTimeZone$1.run(SimpleTimeZone.ja= va:50)
>> =A0 =A0 =A0 =A0at java.util.SimpleTimeZone$1.run(SimpleTimeZone.ja= va:1)
>> =A0 =A0 =A0 =A0at
>> java.security.AccessController.doPrivilegedImpl(AccessController.j= ava
>> :171)
>> =A0 =A0 =A0 =A0at
>> java.security.AccessController.doPrivileged(AccessController.java:= 53)
>>
>> =A0 =A0 =A0 =A0at java.util.SimpleTimeZone.getICUTimeZone(SimpleTi= meZone.java:48)
>> =A0 =A0 =A0 =A0at java.util.SimpleTimeZone.<init>(SimpleTime= Zone.java:110)
>> =A0 =A0 =A0 =A0at java.util.TimeZone.<clinit>(TimeZone.java:= 91)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.ASN1Time.getDecodedObject(ASN1Tim= e.j
>> ava:51)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.ASN1UTCTime.decode(ASN1UTCTime.ja= va:
>> 96)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.ASN1Choice.decode(ASN1Choice.java= :32
>> 0)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.BerInputStream.readSequence(BerIn= put
>> Stream.java:665)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.DerInputStream.readSequence(DerIn= put
>> Stream.java:125)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.= jav
>> a:48)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.BerInputStream.readSequence(BerIn= put
>> Stream.java:665)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.DerInputStream.readSequence(DerIn= put
>> Stream.java:125)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.= jav
>> a:48)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.BerInputStream.readSequence(BerIn= put
>> Stream.java:665)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.DerInputStream.readSequence(DerIn= put
>> Stream.java:125)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.= jav
>> a:48)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.BerInputStream.decodeValueCollect= ion
>> (BerInputStream.java:755)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.BerInputStream.readSetOf(BerInput= Str
>> eam.java:733)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.DerInputStream.readSetOf(DerInput= Str
>> eam.java:138)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.ASN1SetOf.decode(ASN1SetOf.java:4= 8)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.ASN1Implicit.decode(ASN1Implicit.= jav
>> a:140)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.BerInputStream.readSequence(BerIn= put
>> Stream.java:665)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.DerInputStream.readSequence(DerIn= put
>> Stream.java:125)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.= jav
>> a:48)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.ASN1Type.decode(ASN1Type.java:97)=
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.pkcs7.ContentInfo$1.getDecodedObject(C= ont
>> entInfo.java:153)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.asn1.ASN1Sequence.decode(ASN1Sequence.= jav
>> a:53)
>> =A0 =A0 =A0 =A0at
>> org.apache.harmony.security.utils.JarUtils.verifySignature(JarUtil= s.j
>> ava:73)
>> =A0 =A0 =A0 =A0at java.util.jar.JarVerifier.verifyCertificate(JarV= erifier.java:296)
>> =A0 =A0 =A0 =A0at java.util.jar.JarVerifier.readCertificates(JarVe= rifier.java:265)
>> =A0 =A0 =A0 =A0at java.util.jar.JarFile.getInputStream(JarFile.jav= a:392)
>> =A0 =A0 =A0 =A0at
>> java.net.URLClassLoader$URLJarHandler.createClass(URLClassLoader.j= ava
>> :402)
>> =A0 =A0 =A0 =A0at
>> java.net.URLClassLoader$URLJarHandler.findClass(URLClassLoader.jav= a:3
>> 71)
>> =A0 =A0 =A0 =A0at java.net.URLClassLoader.findClassImpl(URLClassLo= ader.java:1209)
>> =A0 =A0 =A0 =A0at java.net.URLClassLoader$4.run(URLClassLoader.jav= a:901)
>> =A0 =A0 =A0 =A0at java.net.URLClassLoader$4.run(URLClassLoader.jav= a:1)
>> =A0 =A0 =A0 =A0at
>> java.security.AccessController.doPrivilegedImpl(AccessController.j= ava
>> :171)
>> =A0 =A0 =A0 =A0at
>> java.security.AccessController.doPrivileged(AccessController.java:= 64)
>>
>> =A0 =A0 =A0 =A0at java.net.URLClassLoader.findClass(URLClassLoader= .java:903)
>> =A0 =A0 =A0 =A0at java.lang.ClassLoader.loadClass(ClassLoader.java= :488)
>> =A0 =A0 =A0 =A0at
>> java.lang.ClassLoader$SystemClassLoader.loadClass(ClassLoader.java= :87
>> 0)
>> =A0 =A0 =A0 =A0at java.lang.ClassLoader.loadClass(ClassLoader.java= :267)
>> Caused by: java.lang.NullPointerException
>> =A0 =A0 =A0 =A0at com.ibm.icu.util.ULocale.getName(ULocale.java:82= 7)
>> =A0 =A0 =A0 =A0at com.ibm.icu.util.ULocale.<init>(ULocale.ja= va:480)
>> =A0 =A0 =A0 =A0at java.util.Locale.<init>(Locale.java:228) >> =A0 =A0 =A0 =A0at java.util.Locale.<init>(Locale.java:201) >> =A0 =A0 =A0 =A0at java.util.Locale.<clinit>(Locale.java:51)<= br> >> =A0 =A0 =A0 =A0at com.ibm.icu.util.ULocale.<clinit>(ULocale.= java:109)
>> =A0 =A0 =A0 =A0... 54 more
>> FAILED to invoke JVM.
>>
>>
>>
>>
>>
>>
>> On Fri, Sep 24, 2010 at 11:57 AM, Tim Ellison <t.p.ellison@gmail.com>
>> wrote:
>> > On 24/Sep/2010 06:58, Robert Muir wrote:
>> >> On Fri, Sep 24, 2010 at 1:49 AM, Tim Ellison <t.p.ellison@gmail.com>
>> wrote:
>> >>
>> >>> System.out.println(new File("=F3.txt").hash= Code());
>> >>> System.out.println(new File("=F2.txt").hash= Code());
>> >>>
>> >>> prints out
>> >>>
>> >>> 889962580
>> >>> 890776533
>> >>>
>> >>> on both Harmony and the RI.
>> >>>
>> >>>
>> >> but perhaps this is just a bug in the RI?
>> >> according to the link:
>> >>
>> http://download.oracle.com/javase= /6/docs/api/java/io/File.html#hashCode%28%29
>> >> <
>> http://download.oracle.com/javase= /6/docs/api/java/io/File.html#hashCode%28%29
>> >Because
>> >> equality of abstract pathnames is inherently system-depen= dent, so is the
>> >> computation of their hash codes.
>> >>
>> >> Is it a problem that "windows equals" is incons= istent with hashCode
>> here? I
>> >> admit these are corner cases.
>> >
>> > No, I don't think it is a problem. =A0I was reviewing the= invokers of
>> > toLowerCase() and was confused by the wording in the spec. = =A0I'm happy
>> > that we should simply lowercase it in a locale independent wa= y, and
>> > don't need to do a "windows equals" implementat= ion.
>> >
>> > Regards,
>> > Tim
>> >
>>
>>
>>
>> --
>> Mohan
>>
>



--
Mohan

--00163616430fa188130491248d95-- --00163616430fa188210491248d97 Content-Type: text/x-patch; charset=US-ASCII; name="CharsetProviderImpl.diff" Content-Disposition: attachment; filename="CharsetProviderImpl.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gejl6yp01 SW5kZXg6IGNsYXNzbGliL21vZHVsZXMvbmlvX2NoYXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hl L2hhcm1vbnkvbmlvY2hhci9DaGFyc2V0UHJvdmlkZXJJbXBsLmphdmEKPT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0g Y2xhc3NsaWIvbW9kdWxlcy9uaW9fY2hhci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvaGFybW9u eS9uaW9jaGFyL0NoYXJzZXRQcm92aWRlckltcGwuamF2YQkocmV2aXNpb24gMTAwMTM2MykKKysr IGNsYXNzbGliL21vZHVsZXMvbmlvX2NoYXIvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2hhcm1v bnkvbmlvY2hhci9DaGFyc2V0UHJvdmlkZXJJbXBsLmphdmEJKHdvcmtpbmcgY29weSkKQEAgLTI5 LDYgKzI5LDcgQEAKIGltcG9ydCBqYXZhLnV0aWwuSGFzaE1hcDsKIGltcG9ydCBqYXZhLnV0aWwu SXRlcmF0b3I7CiBpbXBvcnQgamF2YS51dGlsLk1hcDsKK2ltcG9ydCBqYXZhLnV0aWwuTG9jYWxl OwogCiAvKioKICAqIFRoaXMgY2xhc3MgaXMgYW4gaW1wbGVtZW50YXRpb24gb2YgdGhlIGphdmEu bmlvLmNoYXJzZXQuc3BpLkNoYXJzZXRQcm92aWRlcgpAQCAtMTAwLDYgKzEwMSwxMCBAQAogICAg ICAqIEEgcGFja2FnZSBuYW1lIHJldHVybmVkIGJ5IDxjb2RlPmdldFBhY2thZ2VOYW1lKCk8L2Nv ZGU+LgogICAgICAqLwogICAgIHByb3RlY3RlZCBTdHJpbmcgcGFja2FnZU5hbWU7CisgICAKKyAg ICAvL1dvcmsgYXJvdW5kIGZvciBIQVJNT05ZLTY2NDksIGhlcmUgTG9jYWxlIHdpbGwgYmUgbG9h ZGVkLCB0aGlzCisgICAgLy8gZW5zdXJlIExvY2FsZSBpcyBsb2FkZWQgYmVmb3JlIFVMb2NhbGUK KyAgICBwcm90ZWN0ZWQgc3RhdGljIExvY2FsZSBkZWZhdWx0TG9jYWxlID0gTG9jYWxlLmdldERl ZmF1bHQoKTsKIAogICAgIC8qCiAgICAgICogVXRpbGl0eSB0byBjb252ZXJ0IHZhbGlkIGNoYXJz ZXQgbmFtZXMgdG8gdXBwZXIgY2FzZQo= --00163616430fa188210491248d97--