commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <>
Subject [jira] Commented: (LANG-411) HashCodeBuilder: expose typed hashing methods
Date Tue, 20 Jul 2010 18:31:49 GMT


Henri Yandell commented on LANG-411:

Thanks Sean.

I don't think ObjectUtils should have state, i.e. static setXyz methods aren't desirable.

It seems to me that the ObjectUtils API needs to be:

+    public static int hashBooleanArray(int currentHash, int multiplier, Boolean[] boolArray)

Putting the target on the end means we could consider using varargs in the API.

> HashCodeBuilder: expose typed hashing methods
> ---------------------------------------------
>                 Key: LANG-411
>                 URL:
>             Project: Commons Lang
>          Issue Type: Wish
>          Components: lang.builder.*
>    Affects Versions: 2.3
>            Reporter: Paul Benedict
>            Priority: Minor
>             Fix For: 3.1
>         Attachments: ObjectUtils-Patch-Addresses-LANG-411-and-LANG-627.txt, ObjectUtilsTest-Patch-Adds-Tests-For-Changes-To-Address-LANG-411-and-LANG-627.txt
> HashCodeBuilder encapsulates the good advice of Joshua Bloch. He details how each java.lang
type should be hashed. I want to use those too ... but without reflection. Please expose those
as static methods:
> hashInt, hashBoolean, etc.
> They should take two parameters: the field value, and the hash multiplier value.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message