hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Zhuge (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HDFS-9573) SnapshotDiffReport$DiffReportEntry$hashCode should use type field
Date Fri, 22 Jan 2016 17:12:39 GMT

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

John Zhuge updated HDFS-9573:
-----------------------------
    Summary: SnapshotDiffReport$DiffReportEntry$hashCode should use type field  (was: o.a.h.hdfs.protocol.SnapshotDiffReport$DiffReportEntry$hashCode
inconsistent with equals)

Fix the summary based on Nicholas' comment.

> SnapshotDiffReport$DiffReportEntry$hashCode should use type field
> -----------------------------------------------------------------
>
>                 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
>         Attachments: HDFS-9573-001.patch
>
>   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)

Mime
View raw message