You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Mike Drob (JIRA)" <ji...@apache.org> on 2014/03/26 19:05:20 UTC

[jira] [Created] (ACCUMULO-2559) Value.equals implementation is not symmetric

Mike Drob created ACCUMULO-2559:
-----------------------------------

             Summary: Value.equals implementation is not symmetric
                 Key: ACCUMULO-2559
                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2559
             Project: Accumulo
          Issue Type: Bug
            Reporter: Mike Drob


{code}
  @Override
  public boolean equals(Object right_obj) {
    if (right_obj instanceof byte[]) {
      return compareTo((byte[]) right_obj) == 0;
    }
    if (right_obj instanceof Value) {
      return compareTo(right_obj) == 0;
    }
    return false;
  }
{code}

Also, {{Value extends WritableComparable<Object>}} which makes the {{compareTo}} method suspect as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)