You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "John Zhuge (JIRA)" <ji...@apache.org> on 2016/01/12 16:31:41 UTC

[jira] [Reopened] (HDFS-9573) o.a.h.hdfs.protocol.SnapshotDiffReport$DiffReportEntry$hashCode inconsistent with equals

     [ https://issues.apache.org/jira/browse/HDFS-9573?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

John Zhuge reopened HDFS-9573:
------------------------------

Unlink this jira from HDFS-9522 for granularity.

> o.a.h.hdfs.protocol.SnapshotDiffReport$DiffReportEntry$hashCode inconsistent with equals
> ----------------------------------------------------------------------------------------
>
>                 Key: HDFS-9573
>                 URL: https://issues.apache.org/jira/browse/HDFS-9573
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: John Zhuge
>            Assignee: John Zhuge
>            Priority: Minor
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> DiffReportEntry.equals() uses field "type", but DiffReportEntry.hashCode() doesn't. This breaks the rules on equals and hashCode:
> * if a class overrides equals, it must override hashCode
> * when they are both overridden, equals and hashCode must use the same set of fields



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)