You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Kostas Kloudas (JIRA)" <ji...@apache.org> on 2017/05/18 09:15:04 UTC
[jira] [Assigned] (FLINK-6624) SharedBuffer#hashCode() uses
multiplier in wrong way
[ https://issues.apache.org/jira/browse/FLINK-6624?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kostas Kloudas reassigned FLINK-6624:
-------------------------------------
Assignee: Kostas Kloudas
> SharedBuffer#hashCode() uses multiplier in wrong way
> ----------------------------------------------------
>
> Key: FLINK-6624
> URL: https://issues.apache.org/jira/browse/FLINK-6624
> Project: Flink
> Issue Type: Bug
> Reporter: Ted Yu
> Assignee: Kostas Kloudas
> Priority: Minor
>
> In SharedBuffer.java:
> {code}
> public int hashCode() {
> return (int) (31 * (timestamp ^ timestamp >>> 32) + 31 * value.hashCode()) + counter;
> {code}
> Multiplier of 31 is applied to both (timestamp ^ timestamp >>> 32) and value.hashCode().
> The following is probably the right expression:
> {code}
> return (int) 31 * (31 * (timestamp ^ timestamp >>> 32) + value.hashCode()) + counter;
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)