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

Tamas Payer resolved AMBARI-25638.
----------------------------------
    Resolution: Fixed

> FindBugs: Class defines equals() and uses Object.hashCode()
> -----------------------------------------------------------
>
>                 Key: AMBARI-25638
>                 URL: https://issues.apache.org/jira/browse/AMBARI-25638
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.7.3, 2.7.4, 2.7.5
>            Reporter: Tamas Payer
>            Assignee: Tamas Payer
>            Priority: Major
>              Labels: cleanup, findbugs, server
>             Fix For: 2.7.6
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> FindBugs finding:
> org.apache.ambari.server.state.alert.MetricSource$JmxInfo defines equals and 
> uses Object.hashCode()
> This class overrides {{equals(Object)}}, but does not override 
> {{hashCode()}}, and inherits the implementation of {{hashCode()}} from 
> {{java.lang.Object}} (which returns the identity hash code, an arbitrary 
> value assigned to the object by the VM).  Therefore, the class is very likely 
> to violate the invariant that equal objects must have equal hashcodes.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to