harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Ellison <t.p.elli...@gmail.com>
Subject Re: [classlib][luni] String.toLowerCase/toUpperCase incorrect for supplementary characters (HARMONY-6649)
Date Fri, 24 Sep 2010 06:27:57 GMT
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("σ.txt").hashCode());
>> System.out.println(new File("ς.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%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-dependent, so is 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 happy
that we should simply lowercase it in a locale independent way, and
don't need to do a "windows equals" implementation.

Regards,
Tim

Mime
View raw message