accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Drob (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-2892) QCMutation defines equals but not hashcode
Date Wed, 11 Jun 2014 20:22:02 GMT


Mike Drob commented on ACCUMULO-2892:

Actually, the situation is more complicated than that. {{QCMutation::hashCode}} inherits {{ConditionalMutation::hashCode}}
which hashes on the thrift representation and the conditions. However, when {{QCMutation::equals}}
delegates to {{QCMutation::compareTo}} it only compares the {{resetTime}} fields, ignoring

[~kturner] - What is the intent here? I can take a guess and make it consistent, but I don't
know if that is correct.

> QCMutation defines equals but not hashcode
> ------------------------------------------
>                 Key: ACCUMULO-2892
>                 URL:
>             Project: Accumulo
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 1.6.0
>            Reporter: Mike Drob
>              Labels: findbugs
>             Fix For: 1.6.1, 1.7.0
> FindBugs output: {{org.apache.accumulo.core.client.impl.ConditionalWriterImpl$QCMutation
defines equals but not hashCode}}
> It looks like {{equals}} also depends on {{compareTo}}, which is unsafe. (This equals
dependency is fine, but compareTo does an unchecked cast.)

This message was sent by Atlassian JIRA

View raw message