RFR (XS) CR 8058643: (str) Re-examine hashCode implementation
Aleksey Shipilev
aleksey.shipilev at oracle.com
Mon Sep 22 14:29:11 UTC 2014
On 09/22/2014 06:13 PM, Aleksey Shipilev wrote:
> On 09/22/2014 06:06 PM, Aleksey Shipilev wrote:
>> Hi again,
>>
>> On 09/17/2014 06:28 PM, Aleksey Shipilev wrote:
>>> Can I have a review and a sponsorship for this tiny readability cleanup
>>> in String.hashCode()?
>>> http://cr.openjdk.java.net/~shade/8058643/webrev.01/
>>> https://bugs.openjdk.java.net/browse/JDK-8058643
>>
>> I think we have enough reviews? Here is a changeset:
>> http://cr.openjdk.java.net/~shade/8058643/8058643.changeset
>>
>> Please sponsor!
>
> Wait. Claes spotted an inconsistency:
>
> Should be:
> for (char v : value) {
>
> Not:
> for (int v : value) {
Fixed:
http://cr.openjdk.java.net/~shade/8058643/webrev.02/
http://cr.openjdk.java.net/~shade/8058643/8058643.changeset
Since there is no performance impact for this touchup (char -> int
promotion is happening anyway), and no functionality changes (char ->
int promotion zero-extends), I haven't developed any new tests, or
re-spinned any existing ones.
Thanks,
-Aleksey.
More information about the core-libs-dev
mailing list