[
https://issues.apache.org/jira/browse/ACCUMULO-3644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14348046#comment-14348046
]
Josh Elser commented on ACCUMULO-3644:
--------------------------------------
bq. change PasswordToken so that it doesn't consider subclasses to be equal...
they must also be exactly PasswordToken
This seems to make more sense to me. A PasswordToken shouldn't consider a
DelegationToken to be equal. I'm guessing we just want to change {{obj
instanceof PasswordToken}} in {{PasswordToken.equals}} to be
{{obj.getClass().equals(PasswordToken.class)}} instead?
> [FindBugs] DelegationToken.equals() is not symmetric with
> PasswordToken.equals()
> --------------------------------------------------------------------------------
>
> Key: ACCUMULO-3644
> URL: https://issues.apache.org/jira/browse/ACCUMULO-3644
> Project: Accumulo
> Issue Type: Sub-task
> Components: client
> Reporter: Christopher Tubbs
> Assignee: Josh Elser
> Labels: findbugs
> Fix For: 1.7.0
>
>
> FindBugs at rank 8 warns about DelegationToken overriding PasswordToken, but
> doing so in a way that makes {{a.equals(b)}} possibly not the same result as
> {{b.equals(a)}} when one of them is a DelegationToken and one of them isn't.
> I see two fixes:
> # ensure that the entirety of what describes DelegationToken are in the bits
> checked by PasswordToken and don't override it
> # change PasswordToken so that it doesn't consider subclasses to be equal...
> they must also be exactly PasswordToken
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)