[jdk9] RFR: 8158802: com.sun.jndi.ldap.SimpleClientId produces wrong hash code
Ivan Gerasimov
ivan.gerasimov at oracle.com
Thu Jun 9 13:52:27 UTC 2016
Could someone please help review this?
The essential part of the fix is quite simple: i.e. replacing
char/byte[].hashCode() with Arrays.hashCode(char/byte[]).
The regression test confirms that the change is good.
With kind regards,
Ivan
On 06.06.2016 19:58, Ivan Gerasimov wrote:
> Hello!
>
> It was noticed that objects of an internal class SimpleClientId that
> are equal (in terms of equals() method) can have different hash codes.
> This happens when the password is represented with an array, so
> passwd.hashCode() produces unique value even when the content is same.
>
> Some minor cleanup was done in the sibling file to remove an
> intermediate hash value.
>
> Would you please help review the fix?
>
> BUGURL: https://bugs.openjdk.java.net/browse/JDK-8158802
> WEBREV: http://cr.openjdk.java.net/~igerasim/8158802/00/webrev/
>
> With kind regards,
> Ivan
>
>
More information about the core-libs-dev
mailing list