RFR: 8166365: Small immutable collections should provide optimized implementations when possible

Attila Szegedi szegedia at gmail.com
Wed Jan 11 16:01:09 UTC 2017


Collections.java:

4987         @Override
4988         public int hashCode() {
4989             return (k == null ? 0 : k.hashCode()) ^
4990                    (v == null ? 0 : v.hashCode());

Why not use Objects.hashCode here too, that is return Objects.hashCode(k) ^ Objects.hashCode(v) ?

Attila.

> On 11 Jan 2017, at 14:43, Claes Redestad <claes.redestad at oracle.com> wrote:
> 
>> ...
> 
> All done:
> 
> http://cr.openjdk.java.net/~redestad/8166365/webrev.02/
> 
> Thanks for the thorough review!
> 
> /Claes



More information about the core-libs-dev mailing list