You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/10/19 22:23:00 UTC

[jira] [Updated] (ACCUMULO-4726) Don't compare Value with byte[] in Value.equals()

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

ASF GitHub Bot updated ACCUMULO-4726:
-------------------------------------
    Labels: pull-request-available release_notes  (was: release_notes)

> Don't compare Value with byte[] in Value.equals()
> -------------------------------------------------
>
>                 Key: ACCUMULO-4726
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-4726
>             Project: Accumulo
>          Issue Type: Improvement
>          Components: core
>            Reporter: Christopher Tubbs
>            Assignee: Christopher Tubbs
>              Labels: pull-request-available, release_notes
>             Fix For: 2.0.0
>
>
> {{Value.equals(Object)}} currently supports directly comparing Value objects with a {{byte[]}} parameter. This is bad practice, and should not be encouraged, as it exploits a pre-generics Java behavior of accepting "Object" as input, and is prone to user error because of lack of type safety. It is not used by any Accumulo code, except for a test, but could be used by users, since this is public API.
> I suggest changing this behavior in 2.0.0 and replacing that functionality with a {{contentEquals(byte[])}} method. This will need to be documented in the release notes in case any users are (unlikely, but possible) comparing {{Value}} with {{byte[]}} in this way.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)