accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Tubbs (JIRA)" <>
Subject [jira] [Commented] (ACCUMULO-3644) [FindBugs] DelegationToken.equals() is not symmetric with PasswordToken.equals()
Date Fri, 06 Mar 2015 22:18:45 GMT


Christopher Tubbs commented on ACCUMULO-3644:

Will add comment to clarify the constraint placed in PasswordToken (that the classes must
be the same type to be considered equal) and a comment to clarify that we're relying on this
in order to cast obj to DelegationToken without an additional type check.

> [FindBugs] DelegationToken.equals() is not symmetric with PasswordToken.equals()
> --------------------------------------------------------------------------------
>                 Key: ACCUMULO-3644
>                 URL:
>             Project: Accumulo
>          Issue Type: Sub-task
>          Components: client
>            Reporter: Christopher Tubbs
>            Assignee: Christopher Tubbs
>              Labels: findbugs
>             Fix For: 1.7.0
>         Attachments: 0001-ACCUMULO-3644-Make-equals-checks-more-strict-for-tok.patch
> 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

View raw message