[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FYI: Patch: java.text - more merging

From: Mark Wielaard
Subject: Re: FYI: Patch: java.text - more merging
Date: Thu, 08 Jan 2004 11:06:56 +0100


On Wed, 2004-01-07 at 10:31, Michael Koch wrote:
> 2004-01-07  Michael Koch  <address@hidden>
>       * java/text/
>       (collator): Made package-private.
>       (text): Likewise.
>       (index): Likewise.
>       (textIndex): Likewise.

Why? They are not used outside this class.

>         * java/text/
>         (hashCode): Reimplemented.

Are you sure this new implementation is correct?
My Class Libraries book says that the hash code is not based on the
string from which the key was created. Seems you want to base it on the
toByteArray() (key) form.
You should at least document the hashCode() algorithm in the api doc.
Best would be to write a little mauve test for it to see if the equals()
then same hashCode() contract is still obeyed, looks like the equals()
method might also be wrong since the Class Libraries book says "It is
not necessary for the strings from which the keys were created to be



Attachment: signature.asc
Description: This is a digitally signed message part

reply via email to

[Prev in Thread] Current Thread [Next in Thread]